1.0.3 • Published 4 years ago

@juntoz/koa-package-info v1.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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.

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago