An express router that adds an uptime endpoint.
const express = require('express') const router = require('v3-uptime-router');
const app = express(); app.use('/', router);
app.listen(process.env.PORT || 8080);
- Created a router that can be mounted on an express based app that will return a 200 OK and a JSON object with an upSince key holding the value of when the router was required.