New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bug-catch/server

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bug-catch/server

Catch all errors and log custom events within any website.

latest
Source
npmnpm
Version
3.3.8
Version published
Weekly downloads
14
-22.22%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

bugs

FAQs

Package last updated on 07 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts