@lindorm-io/koa
v0.17.11
Published
Koa App & Router for lindorm.io
Downloads
180
Readme
@lindorm-io/koa
Koa App & Router for lindorm.io packages.
Installation
npm install --save @lindorm-io/koa
Usage
KoaApp
const app = new KoaApp({
logger: winstonLogger,
port: 3000,
});
app.addMiddleware(basicAuthMiddleware);
app.addRoute("/route", router);
app.addWorker(intervalWorker);
await app.start();
IntervalWorker
const intervalWorker = new IntervalWorker({
callback: Promise.resolve(),
time: 5000,
logger: winstonLogger,
});