@catalyst-monitor/express
instruments Express for Catalyst, the no-configuration monitoring tool.
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)
To build the library:
yarn build