You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-12
Original file line number
Diff line number
Diff line change
@@ -33,18 +33,21 @@ var client = require('exceptionless.node').ExceptionlessClient.default;
33
33
You can configure the exceptionless client a few different ways. The section below will cover the different ways you can configure the ExceptionlessClient. _NOTE: The only required setting that you need to configure is the clients `apiKey`._
34
34
35
35
#### JavaScript
36
-
1. You can configure the `apiKey` or `serverUrl` as part of the script tag. This will be applied to all new instances of the ExceptionlessClient
37
-
```html
36
+
1. You can configure the `apiKey` as part of the script tag. This will be applied to all new instances of the ExceptionlessClient
3. You can create a new instance of the ExceptionlessClient and specify the `apiKey`, `serverUrl` or [configuration object](https://github.com/exceptionless/Exceptionless.JavaScript/blob/master/src/configuration/IConfigurationSettings.ts).
47
-
```javascript
49
+
50
+
```javascript
48
51
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE');
49
52
// or with a api key and server url.
50
53
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
@@ -57,14 +60,16 @@ var client = new exceptionless.ExceptionlessClient({
57
60
```
58
61
59
62
#### Node.js
60
-
1. You can set the `apiKey` or `serverUrl` on the default ExceptionlessClient instance.
61
-
```javascript
63
+
1. You can set the `apiKey` on the default ExceptionlessClient instance.
64
+
65
+
```javascript
62
66
var client =require('exceptionless.node').ExceptionlessClient.default;
63
67
client.config.apiKey='API_KEY_HERE';
64
-
client.config.serverUrl='http://localhost:50000';
65
68
```
69
+
66
70
2. You can create a new instance of the ExceptionlessClient and specify the `apiKey`, `serverUrl` or [configuration object](https://github.com/exceptionless/Exceptionless.JavaScript/blob/master/src/configuration/IConfigurationSettings.ts).
67
-
```javascript
71
+
72
+
```javascript
68
73
var exceptionless =require('exceptionless.node');
69
74
70
75
var client =newexceptionless.ExceptionlessClient('API_KEY_HERE');
@@ -159,6 +164,23 @@ try {
159
164
}
160
165
```
161
166
167
+
## Self hosted options
168
+
169
+
The Exceptionless client can also be configured to send data to your self hosted instance. This is configured by setting the serverUrl setting to point to your Exceptionless instance.
170
+
171
+
#### JavaScript
172
+
You can set the `serverUrl` on the default ExceptionlessClient instance.
You can set the `serverUrl` on the default ExceptionlessClient instance.
179
+
```javascript
180
+
var client =require('exceptionless.node').ExceptionlessClient.default;
181
+
client.config.serverUrl='http://localhost:50000';
182
+
```
183
+
162
184
## Getting Started (Development)
163
185
164
186
The JavaScript client can be installed via [bower](http://bower.io/search/?q=exceptionless), [npm](https://www.npmjs.com/package/exceptionless) or cdn. If you need help, please contact us via in-app support or [open an issue](https://github.com/exceptionless/Exceptionless.JavaScript/issues/new). We’re always here to help if you have any questions!
0 commit comments