X-Project headers for Express.js applications.
$ npm install @starefossen/express-project-x --save
const xapp = require('@starefossen/express-project-x');
The simple configuration reads your package.json
and will set the following
headers if their values are defined in your package.json
:
X-App-Name
X-App-Version
X-App-Author
X-App-Homepage
const xapp = require('@starefossen/express-project-x');
app.use(xapp.middleware);
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));