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
-**Advanced search:** Filter items by many different properties. <ahref="https://docs.rollbar.com/docs/search-items">Learn more about search</a>.
23
23
-**Customizable notifications:** Rollbar supports several messaging and incident management tools where your team can get notified about errors and important events by real-time alerts. <ahref="https://docs.rollbar.com/docs/notifications">Learn more about Rollbar notifications</a>.
24
24
25
-
## Setup Instructions
25
+
## Installation
26
26
27
-
1.[Sign up for a Rollbar account](https://rollbar.com/signup).
28
-
2. For client-side Javascript, follow the [Browser Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-browser) instructions. For Node.js, follow the [Server Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-server).
27
+
Using npm:
28
+
29
+
```bash
30
+
npm install --save rollbar
31
+
```
32
+
33
+
Using yarn:
34
+
35
+
```bash
36
+
yarn add rollbar
37
+
```
38
+
39
+
For CDN/script tag installation, see [Quick Start → Browser](#browser)
40
+
41
+
## Quick Start
42
+
43
+
First, [**sign up for a Rollbar account**](https://rollbar.com/signup) if you haven't already.
44
+
45
+
### Browser
46
+
47
+
For the recommended snippet-based installation with automatic error capture and telemetry, see our [Browser JS – Quick Start documentation](https://docs.rollbar.com/docs/browser-js#quick-start).
48
+
49
+
### Node.js
50
+
51
+
```javascript
52
+
constRollbar=require('rollbar');
53
+
54
+
constrollbar=newRollbar({
55
+
accessToken:'POST_SERVER_ITEM_ACCESS_TOKEN',
56
+
captureUncaught:true,
57
+
captureUnhandledRejections:true,
58
+
payload: { code_version:'1.0.0' },
59
+
});
60
+
61
+
// log a generic message and send to rollbar
62
+
rollbar.log('Hello world!');
63
+
```
64
+
65
+
For **framework** integrations (**Express**, **Koa**, **Hapi**, and more), custom error handlers, and advanced configuration, see our [Node.js server configuration documentation](https://docs.rollbar.com/docs/nodejs#server-configuration).
29
66
30
67
## Usage and Reference
31
68
32
69
For complete usage instructions and configuration reference, see our [Javascript SDK docs](https://docs.rollbar.com/docs/javascript).
33
70
71
+
### Examples
72
+
73
+
See the [examples directory](./examples/) for detailed integration examples with various frameworks and build tools including **React**, **Angular**, **Vue.js**, **Next.js**, and more.
74
+
34
75
## Release History & Changelog
35
76
36
77
See our [Releases](https://github.com/rollbar/rollbar.js/releases) page for a list of all releases, including changes.
@@ -41,19 +82,6 @@ If you run into any issues, please email us at [[email protected]](mailto:supp
41
82
42
83
For bug reports, please [open an issue on GitHub](https://github.com/rollbar/rollbar.js/issues/new).
43
84
44
-
## Developing
45
-
46
-
To set up a development environment, you'll need Node.js and npm.
Each example includes its own README with specific setup instructions. Common patterns:
22
+
First, [sign up for a Rollbar account](https://rollbar.com/signup) if you haven't already. Each example includes its own README with specific setup instructions.
For the recommended snippet-based installation with automatic error capture and telemetry, see our [Browser JS – Quick Start documentation](https://docs.rollbar.com/docs/browser-js#quick-start).
34
29
35
30
### Node.js / CommonJS
31
+
36
32
```javascript
37
33
constRollbar=require('rollbar');
34
+
38
35
constrollbar=newRollbar({
39
-
accessToken:'YOUR_ACCESS_TOKEN',
40
-
environment:'production'
36
+
accessToken:'POST_SERVER_ITEM_ACCESS_TOKEN',
37
+
captureUncaught:true,
38
+
captureUnhandledRejections:true,
39
+
payload: { code_version:'1.0.0' },
41
40
});
42
41
```
43
42
44
43
### ES Modules / TypeScript
44
+
45
45
```javascript
46
46
importRollbarfrom'rollbar';
47
+
47
48
constrollbar=newRollbar({
48
-
accessToken:'YOUR_ACCESS_TOKEN',
49
-
environment:'production'
49
+
accessToken:'POST_SERVER_ITEM_ACCESS_TOKEN',
50
+
environment:'production',
50
51
});
51
52
```
52
53
53
54
## Available Examples
54
55
55
56
### Framework Examples
57
+
56
58
-**[angular/](./angular/)** - Angular 18+ with TypeScript and error handlers
57
59
-**[react/](./react/)** - React with error boundaries
0 commit comments