capaj / koa-monitor

🚀 Realtime Monitoring solution for koa.js, inspired by status.github.com
MIT License
229 stars 16 forks source link

How to use it in `koa-router`? #8

Open d1y opened 4 years ago

d1y commented 4 years ago

Like this? Instead of instantiating it via http.createServer

import router from '@koa/router'
const monitor = require('koa-monitor')

const Router = new router({
  prefix: 'monitor'
})

Router.use(monitor())