3.3.8 • Published 9 months ago

@bug-catch/server v3.3.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

Bug Catch

Catch all errors and log custom events within any website.

Browser / Server

Usage

Install

$ npm install --save @bug-catch/server

Initiate

Bugcatch server is initiated as express middleware. This way you can integrate it with your existing API (or just create a simple express server that only uses bugcatch)

const express = require("express");
const bugcatch = require("@bug-catch/server");

const server = express();

server.use(
    "/bugcatch",
    bugcatch({
        api: {
            token: "super-secret-password", // Token required for viewing collected data
            rateLimit: {
                // Rate limiter to reduce spam
                // Default value is 15 requests every 1 hour (per user)
                windowMs: 60 * 60 * 1000, // 60 minutes
                max: 15,
            },
        },
        mongodb: {
            uri: "mongodb://$[username]:$[password]@$[hostlist]/$[database]?authSource=$[authSource]",
            database: "appname-bugcatch",
        },
    })
);

server.use("/", other_routes);

Thats it! - sit back and try not to panic as the bugs roll in!

License

Apache-2.0 License

3.3.8

9 months ago

3.3.6

9 months ago

3.1.1

2 years ago

3.3.4

2 years ago

2.4.2

2 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago