express-version

0.2.0 • Public • Published

express-version

Automatically publish package.json and git information out over your app.

build status coverage license version downloads

var express = require('express'),
    version = require('express-version');
 
var app = express();
 
app.use(version.pkg());
app.use(version.git());

Usage

.git

You can export branch, commit or tags as a header. The defaults are shown below:

version.git({
    path: process.cwd(),
    headers: {
        'X-Branch': 'branch',
        'X-Commit': 'commit',
        'X-Tags': 'tags'
    }
});

.pkg

You can export any field in the package.json file as a header. The defaults are shown below:

version.pkg({
    path: process.cwd(),
    headers: {
        'X-Name': 'name',
        'X-Version': 'version'
    }
});

Package Sidebar

Install

npm i express-version

Weekly Downloads

25

Version

0.2.0

License

CC0-1.0

Last publish

Collaborators

  • izaakschroeder