Skip to content

Commit d0fa598

Browse files
committed
2 parents 7c6157c + b2b4793 commit d0fa598

File tree

1 file changed

+34
-12
lines changed

1 file changed

+34
-12
lines changed

README.md

+34-12
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,21 @@ var client = require('exceptionless.node').ExceptionlessClient.default;
3333
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`._
3434

3535
#### 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
37+
38+
```html
3839
<script src="bower_components/exceptionless/dist/exceptionless.min.js?apiKey=API_KEY_HERE"></script>
3940
```
40-
2. You can set the `apiKey` or `serverUrl` on the default ExceptionlessClient instance.
41-
```javascript
42-
var client = exceptionless.ExceptionlessClient.default;
43-
client.config.apiKey = 'API_KEY_HERE';
44-
client.config.serverUrl = 'http://localhost:50000';
41+
42+
2. You can set the `apiKey` on the default ExceptionlessClient instance.
43+
44+
```javascript
45+
exceptionless.ExceptionlessClient.default.config.apiKey = 'API_KEY_HERE';
4546
```
47+
4648
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
4851
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE');
4952
// or with a api key and server url.
5053
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
@@ -57,14 +60,16 @@ var client = new exceptionless.ExceptionlessClient({
5760
```
5861

5962
#### 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
6266
var client = require('exceptionless.node').ExceptionlessClient.default;
6367
client.config.apiKey = 'API_KEY_HERE';
64-
client.config.serverUrl = 'http://localhost:50000';
6568
```
69+
6670
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
6873
var exceptionless = require('exceptionless.node');
6974

7075
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE');
@@ -159,6 +164,23 @@ try {
159164
}
160165
```
161166

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.
173+
```javascript
174+
exceptionless.ExceptionlessClient.default.config.serverUrl = 'http://localhost:50000';
175+
```
176+
177+
#### Node.js
178+
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+
162184
## Getting Started (Development)
163185

164186
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

Comments
 (0)