1.0.1 • Published 9 years ago
@starefossen/express-project-x v1.0.1
@starefossen/express-project-x
X-Project headers for Express.js applications.
Install
$ npm install @starefossen/express-project-x --saveUsage
const xapp = require('@starefossen/express-project-x');Simple
The simple configuration reads your package.json and will set the following
headers if their values are defined in your package.json:
X-App-NameX-App-VersionX-App-AuthorX-App-Homepage
const xapp = require('@starefossen/express-project-x');
app.use(xapp.middleware);Advanced
The advanced configuration takes in a configuration object and an optional data object.
const xapp = require('@starefossen/express-project-x');
const data = require('./package');
app.use(xapp({
name: true,
version: false,
license: true,
}, data));