mirv

0.0.9 • Public • Published

Build Status Coverage Status dependency Status devDependency Status NPM version

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] || '.'}});

Readme

Keywords

none

Package Sidebar

Install

npm i mirv

Weekly Downloads

16

Version

0.0.9

License

ISC

Last publish

Collaborators

  • hbouvier