0.2.0 • Published 9 years ago

express-version v0.2.0

Weekly downloads
28
License
CC0-1.0
Repository
github
Last release
9 years ago

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