-Track and fix JavaScript errors fired by your visitor's browsers.
+
-### Screenshots
+----------
-
+
-
-
+### Configuration file
-### Prerequisites
+#### Basic
-* Node.js and NPM
-* A free port
-
-### Installation
-
- $ git clone git://github.com/Lapple/ErrorBoard.git
- $ cd ErrorBoard
- $ npm install
-
-### Configuration
-
-Edit the `config.json` under `config` directory:
+The following codes are in `config.sample.json`, shipped with the project. If no `config.json` found in root directory, `config.sample.json` will be used to generate a default `config.json`.
```js
{
- "dbfile": "db", // path to database file
- "port": 3000 // web application port
+ "db":"mongodb://localhost:27017/ErrorBucket", // MongoDB Connection String
+ "port": 3000, // Listening Port
+ "baseurl": "http://localhost:3000" // Base URL
}
```
-If you do not have a `config.json` under `config` directory, `config.sample.json` will be used to generate a new `config.json` for you. This way, you can get a quick start to explore this project.
-
-### Access Control
-
-By default, this project can be viewed by anyone who knows the URL. If you want to add access control, you can configure it in `config.json` as well:
+#### Advanced
```js
{
- "dbfile": "data/db",
+ "db":"mongodb://localhost:27017/ErrorBucket?maxPoolSize=10",
"port": 3000,
- "baseurl": "",
+ "baseurl": "http://localhost:3000",
+ "logttl": 345600, // Time to Live for Each Error Log
+ "errorAlert": {
+ "interval": 600, // The Unit Time
+ "threshold": 600, // Threshold
+ "recipient": ["user@example.com", "name@example.com"]
+ },
"auth": {
- "emailpattern": "",
- "methods": {
- "google-oauth2": {
- "enabled": true,
- "clientID": "",
- "clientSecret": ""
- }
+ "google": {
+ "enabled": false,
+ "emailpattern": "@example\\.(com|net)",
+ "clientID": "",
+ "clientSecret": ""
+ },
+ "github": {
+ "enabled": true,
+ "organizationMembership": ["example"],
+ "clientID": "",
+ "clientSecret": ""
+ },
+ "local": {
+ "enabled": false,
+ "users": [
+ {"username": "user", "password": "__pass__"},
+ {"username": "name", "password": "__word__"}
+ ]
}
}
}
```
-This project makes use of [Passport.js](http://passportjs.org/), which supports more than 140 authentication strategies including your favorite social authentications like Facebook, Twitter and Google. It's worthwhile to take a minute to learn how to use this middleware.
-
-If `auth` field is not set in `config.json` or the `enabled` field of all the methods are set to `false`, then no authentication will be enforced. Everyone can view the content of this project. Otherwise, the methods that have `enabled` field set to `true` will be used to authenticate users.
-
-`emailpattern` under `auth` is optional. If it is not set, everyone who passes the authentication API can log into the project. Otherwise, the users' email addresses will be validated after authentication API has returned.
-
-`emailpattern` can be either regexp or array. For example:
-
-```json
-"auth": {
- "emailpattern": "@baixing\\.(com|net)$",
-}
-
-vs.
-
-"auth": {
- "emailpattern": ["@baixing\\.com", "@baixing\\.net"],
-}
-```
-
-Both ways are supported.
-
-Fields under `methods` should match the name of the corresponding adapter. For example, `google-oauth2` in the example above matches the name of `authentication-google-oauth2.js`.
-
-### Running
-
-After you have everything installed and configured, run:
-
- npm start
-
-Once the app has started successfully, navigate to `localhost` at specified port (*e.g.* http://127.0.0.1:3000/) to get the error data. Similar error messages are not grouped, however the one can navigate to *Scripts* tab to get the idea which file:line pairs produce most errors.
### Browser snippet
@@ -106,7 +88,7 @@ window.onerror = function( message, url, line, column, error ) {
Replace `127.0.0.1:3000` with the address and the port number your ErrorBoard is running.
-### License
+### Original License
(The MIT License)
diff --git a/client/app.js b/client/app.js
index 0d4a667..3dd454e 100644
--- a/client/app.js
+++ b/client/app.js
@@ -14,7 +14,7 @@ var updateApp = function(ctx) {
_context = ctx;
}
- var loggedin = cookie.load('error_board_logged_in');
+ var loggedin = cookie.load('error_bucket_logged_in');
var props = {
state: _context.state,
diff --git a/client/component-login.jsx b/client/component-login.jsx
index 8f775ba..721e804 100644
--- a/client/component-login.jsx
+++ b/client/component-login.jsx
@@ -7,7 +7,7 @@ module.exports = React.createClass({
return