mirv
v0.0.9
Published
Clustered Web Server
Downloads
7
Readme
Multiple Independently Request Vassal (MIRV)
$ npm install -g istanbul
Use it as a module
npm --save install mirv
'use strict';
const mirv = require('./lib'),
express = require('express'),
path = require('path'),
fs = require('fs');
function routes(app, config, logger) {
const pkg = JSON.parse(fs.readFileSync(`${path.resolve(__dirname)}/package.json`));
app.use(express.static(config.routes.ressources_path));
app.get('/healthz', (req, res) => {
res.json({ok:true}).end();
});
app.get('/version', (req, res) => {
res.json({version:pkg.version}).end();
});
}
const do_not_log_routes = ['/healthz'];
mirv.supervisor(mirv.rest(routes, do_not_log_routes), {routes:{ressources_path:process.argv[2] || '.'}});