Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
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.

Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
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 = new require('acceleratd.api.versioning')();

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

api.run();

FAQs

Package last updated on 18 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