1.1.0 • Published 6 years ago
koa-glitch-keepalive v1.1.0
koa-glitch-keepalive
A koa middleware that keeps the Glitch project alive.
Inspired by hubot-heroku-keepalive
Installation
npm i -S koa koa-glitch-keepalive
const Koa = require('koa');
const keepalive = require('koa-glitch-keepalive');
const app = new Koa();
app.use(keepalive());
app.use(ctx => {
ctx.body = 'Hello, world!';
});
app.listen(process.env.PORT);