Socket
Book a DemoInstallSign in
Socket

accelerated.api.versioning

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accelerated.api.versioning

Seamless app versioning via package.json.

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

Usage

This module seamlessly adds API versioning into your accelerated.api app by returning your package.json version via response headers. By default, the header name is X-Accelerated-API-Version, but you can override that in your accelerated.api env.json:

"EXPRESS_API_VERSION_HEADER": "Your-API-Version-Header"

Once you include accelerated.api.versioning into your project dependencies and npm install accelerated.api.versioning --save your project (thereby installing this module), you'll want to include the module like this:


var api = require('accelerated.api');

var apiVersioning = require('acceleratd.api.versioning').use();

api.useMiddlewares([ 
	[apiVersioning.key, apiVersioning.middleware]
]);

api.run();

FAQs

Package last updated on 19 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts