Skip to content

Commit

Permalink
Add raven monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnelson committed Jun 9, 2018
1 parent 04c90be commit a4daf05
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ The method for doing this will vary by operating system. On Mac OSX, add an entr
127.0.0.1 fastjs.local
```

Then, you can test the subdomain redirects by visiting `react.fastjs.local`.
Then, you can test the subdomain redirects by visiting `react.fastjs.local`.

# Monitoring

Set the environment variable `RAVEN_URL` to use Raven for monitoring.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ const request = require("request");
const NodeCache = require("node-cache");
const cache = new NodeCache({ stdTTL: 60 });
const fs = require("fs");
const Raven = require("raven");

let ravenUrl = process.env.RAVEN_URL;
if (ravenUrl) {
Raven.config(process.env.RAVEN_URL).install();
}

const html = fs.readFileSync("./index.html", "utf8");

Expand Down
54 changes: 54 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"express": "^4.16.3",
"node-cache": "^4.2.0",
"prettier": "^1.13.3",
"raven": "^2.6.2",
"request": "^2.87.0"
}
}

0 comments on commit a4daf05

Please sign in to comment.