Skip to content

Commit 05527c1

Browse files
committed
Added a self hosted section.
This should clear up any confusion for those who are copy and pasting code into their app and wondering why it's not working.
1 parent fdf36b1 commit 05527c1

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

README.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,13 @@ 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
36+
1. You can configure the `apiKey` as part of the script tag. This will be applied to all new instances of the ExceptionlessClient
3737
```html
3838
<script src="bower_components/exceptionless/dist/exceptionless.min.js?apiKey=API_KEY_HERE"></script>
3939
```
40-
2. You can set the `apiKey` or `serverUrl` on the default ExceptionlessClient instance.
40+
2. You can set the `apiKey` on the default ExceptionlessClient instance.
4141
```javascript
42-
var client = exceptionless.ExceptionlessClient.default;
43-
client.config.apiKey = 'API_KEY_HERE';
44-
client.config.serverUrl = 'http://localhost:50000';
42+
exceptionless.ExceptionlessClient.default.config.apiKey = 'API_KEY_HERE';
4543
```
4644
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).
4745
```javascript
@@ -57,11 +55,10 @@ var client = new exceptionless.ExceptionlessClient({
5755
```
5856

5957
#### Node.js
60-
1. You can set the `apiKey` or `serverUrl` on the default ExceptionlessClient instance.
58+
1. You can set the `apiKey` on the default ExceptionlessClient instance.
6159
```javascript
6260
var client = require('exceptionless.node').ExceptionlessClient.default;
6361
client.config.apiKey = 'API_KEY_HERE';
64-
client.config.serverUrl = 'http://localhost:50000';
6562
```
6663
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).
6764
```javascript
@@ -159,6 +156,23 @@ try {
159156
}
160157
```
161158

159+
## Self hosted options
160+
161+
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.
162+
163+
#### JavaScript
164+
You can set the `serverUrl` on the default ExceptionlessClient instance.
165+
```javascript
166+
exceptionless.ExceptionlessClient.default.config.serverUrl = 'http://localhost:50000';
167+
```
168+
169+
#### Node.js
170+
You can set the `serverUrl` on the default ExceptionlessClient instance.
171+
```javascript
172+
var client = require('exceptionless.node').ExceptionlessClient.default;
173+
client.config.serverUrl = 'http://localhost:50000';
174+
```
175+
162176
## Getting Started (Development)
163177

164178
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)