1.0.1 • Published 8 years ago

@starefossen/express-project-x v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

@starefossen/express-project-x

Build status Codacy grade Codacy coverage NPM downloads NPM version Node version Dependency status

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

MIT Licensed