Skip to content

Commit b2b4793

Browse files
committed
Update README.md
1 parent 3ba498e commit b2b4793

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

README.md

+28-20
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,20 @@ You can configure the exceptionless client a few different ways. The section bel
3434

3535
#### JavaScript
3636
1. You can configure the `apiKey` as part of the script tag. This will be applied to all new instances of the ExceptionlessClient
37+
3738
```html
38-
<script src="bower_components/exceptionless/dist/exceptionless.min.js?apiKey=API_KEY_HERE"></script>
39-
```
39+
<script src="bower_components/exceptionless/dist/exceptionless.min.js?apiKey=API_KEY_HERE"></script>
40+
```
41+
4042
2. You can set the `apiKey` on the default ExceptionlessClient instance.
43+
4144
```javascript
42-
exceptionless.ExceptionlessClient.default.config.apiKey = 'API_KEY_HERE';
43-
```
45+
exceptionless.ExceptionlessClient.default.config.apiKey = 'API_KEY_HERE';
46+
```
47+
4448
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).
45-
```javascript
49+
50+
```javascript
4651
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE');
4752
// or with a api key and server url.
4853
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
@@ -56,24 +61,27 @@ var client = new exceptionless.ExceptionlessClient({
5661

5762
#### Node.js
5863
1. You can set the `apiKey` on the default ExceptionlessClient instance.
64+
5965
```javascript
60-
var client = require('exceptionless.node').ExceptionlessClient.default;
61-
client.config.apiKey = 'API_KEY_HERE';
62-
```
66+
var client = require('exceptionless.node').ExceptionlessClient.default;
67+
client.config.apiKey = 'API_KEY_HERE';
68+
```
69+
6370
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).
71+
6472
```javascript
65-
var exceptionless = require('exceptionless.node');
66-
67-
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE');
68-
// or with a api key and server url.
69-
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
70-
// or with a configuration object
71-
var client = new exceptionless.ExceptionlessClient({
72-
apiKey: 'API_KEY_HERE',
73-
serverUrl: 'http://localhost:50000',
74-
submissionBatchSize: 100
75-
});
76-
```
73+
var exceptionless = require('exceptionless.node');
74+
75+
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE');
76+
// or with a api key and server url.
77+
var client = new exceptionless.ExceptionlessClient('API_KEY_HERE', 'http://localhost:50000');
78+
// or with a configuration object
79+
var client = new exceptionless.ExceptionlessClient({
80+
apiKey: 'API_KEY_HERE',
81+
serverUrl: 'http://localhost:50000',
82+
submissionBatchSize: 100
83+
});
84+
```
7785

7886
### Sending Events
7987
Once configured, Exceptionless will automatically send any unhandled exceptions that happen in your application. The sections below will show you how to send us different event types as well as customize the data that is sent in.

0 commit comments

Comments
 (0)