11# JavaScript library for Coderr
22
3- This library is alpha . Feel free to try it, and please give us feedback.
3+ This library is currently avilable as a release candidate . Feel free to try it, and please give us feedback.
44
5- ## Example
5+ https://coderr.io
6+
7+ ## Examples
8+
9+ The following examples are just demonstrating basic usage:
10+
11+ ### Using plain browser scripts
612
713``` html
814<html >
915 <head >
1016 <script src =" coderr.browser.js" ></script >
1117 <script >
1218 // Setup
13- var config = new coderr.Configuration (" http ://localhost:50473/ " , " f7aeacfdbe5447cdada6aa9ee21d24fb" );
19+ var config = new coderr.Configuration (" https ://report.coderr.io " , " f7aeacfdbe5447cdada6aa9ee21d24fb" );
1420 var reporter = new coderr.Coderr (config);
1521
1622 // report all unhandled errors
@@ -21,7 +27,7 @@ This library is alpha. Feel free to try it, and please give us feedback.
2127 // This is how manual reporting is done.
2228 //
2329 // In this case not really nessacary since
24- // "catchDomErrors" would have reprted it.
30+ // "catchDomErrors" would have reported it.
2531 try {
2632 var a = 10 / 0 ;
2733 }
@@ -33,10 +39,36 @@ This library is alpha. Feel free to try it, and please give us feedback.
3339</html >
3440````
3541
36- ## Example from UI
42+ **From the Coderr Server UI**
3743
3844
3945
4046Example showing the "userAgent" context collection.
4147
42- Coderr automatically includes information about the window, document, cookies, navigator and screen.
48+ For browsers, Coderr automatically includes information about the window, document, cookies, navigator and screen.
49+
50+ ## Using TypeScript
51+
52+ ```typescript
53+ import { CoderrClient, Configuration } from "coderr.client";
54+ import { catchVueErrors } from "./Coderr.Vue"
55+
56+ var config = new Configuration("https://report.coderr.io/", "8ffd506b153f4ca690daaf6abd5fdcdf");
57+ config.environmentName = 'production';
58+ config.applicationVersion = 'v1.0';
59+
60+ var client = new CoderrClient(config);
61+ client.catchDomErrors();
62+ catchVueErrors(client);
63+ ```
64+
65+ ** Result**
66+
67+ ![ ] ( docs/vue.png )
68+
69+ For VueJs, Coderr collections information about the failing component, the HTML for the rendered component view, selected routes and more.
70+
71+
72+ # Questions
73+
74+ https://discuss.coderr.io
0 commit comments