Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-legacy-atatus

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-legacy-atatus

Koa middleware to allow Atatus monitor Koa 1.x applications

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

koa-atatus

Koa middleware to allow Atatus monitor Koa 1.x applications like Express.

Installation

npm install koa-legacy-atatus

API

You must add the koa-atatus middleware to every koa router instance before defining the routes.

var atatus = require("atatus-node");
atatus.start({
    apiKey: 'YOUR_API_KEY',
});
var koaAtatus = require('koa-legacy-atatus')(atatus);

var Koa = require('koa'),
    Router = require('koa-router');

var app = new Koa();
var router = new Router();
router.use(koaAtatus);      // This line should be added for every router instance.

// Routes
router.get('/', function *(next) {...});

// For error capturing
app.on('error', (err, ctx) => {
    atatus.notifyError(err);
});

app.use(router.routes());
app.listen(3000);

License

Copyright (c) 2018 Atatus

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 20 Jan 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc