@juntoz/koa-package-info
v1.0.3
Published
Plugin for Koa to add a route that will return the package name and version, used to know which version is running
Downloads
3
Keywords
Readme
koa-package-info
Plugin for Koa to add a route that will return the package name and version, used to know which version is running
Usage
const Koa = require('koa');
const pkinfo = require('koa-package-info');
// create koa app
var app = new Koa();
// setup the route
pkinfo(app, youroptions);
Options
var options = {
// route path to use, default is /tools/version
path: '/tools/version',
// package.json location relative to the main file (index.js), so we can use require.main.require to load it
pathToPackageJson: './package.json'
}
Possible breach?
I don't think so, an application name and version is information that is public domain (kind of looking at excel.exe properties).
So if you modify this project to provide more information, consider this premise before exposing other fields.