@catalyst-monitor/express
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Catalyst Express Instrumentation

@catalyst-monitor/express instruments Express for Catalyst, the no-configuration monitoring tool.

Installation

You can also check out the Express instrumentation documentation here.

Before you start, please sign up for an account on the Catalyst dashboard.

Install the packages:

npm install @catalyst-monitor/server @catalyst-monitor/express

If you haven't already, start Catalyst as soon as possible:

import Catalyst from '@catalyst-monitor/server'

Catalyst.start({
  privateKey: '<Get from Catalyst>',
  systemName: 'distingushing-name-here',
  version: 'any-version-string-here',
})

Then, instrument Express:

import express from 'express'
import {
  catalystErrorHandler,
  catalystHandler,
} from '@catalyst-monitor/express'

const app = express()

// The Catalyst middleware should be installed as early as possible
// to capture any logs and errors.
app.use(catalystHandler)

// Your routes here...

// The Catalyst error handler should be installed as late as possible
// to record any uncaught errors.
app.use(catalystErrorHandler)

Developing

Building

To build the library:

yarn build

Readme

Keywords

none

Package Sidebar

Install

npm i @catalyst-monitor/express

Weekly Downloads

10

Version

0.1.1

License

Apache-2.0

Unpacked Size

3.07 kB

Total Files

4

Last publish

Collaborators

  • billliu1992