@starefossen/express-project-x
v1.0.1
Published
X-Project headers for Express.js applications
Downloads
8
Maintainers
Readme
@starefossen/express-project-x
X-Project headers for Express.js applications.
Install
$ npm install @starefossen/express-project-x --save
Usage
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-Name
X-App-Version
X-App-Author
X-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));