Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

accelerated.api.body-parser

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accelerated.api.body-parser

Standard issue body-parser for example and convenience.

Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Usage

This is just out-of-the-box, standard-issue middleware for your accelerated.api project.

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


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

var apiBodyParser = require('acceleratd.api.bodyParser');

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

api.run();

Quick Start

This repo is an easy-to-use npm template to create modules for accelerated.api. Simply clone this repo and:

  • Change your moduleKey and moduleName in index.js. (moduleKey is a key that uniquely identies your module in the context of your app.)

  • Update your package.json with your information and module information.

  • Now actually create your module by utilizing the three CommonJS modules in this repo, middleware, model, and route. Please note the structure and direct injected variables in each CommonJS module and what each is returning.

  • Run npm publish in your command line to publish directly onto npm, and viola! You've got a npm packaged module for accelerated.api.

Using in accelerated.api

Okay, so how do you use this module in your accelerated.api project? Here's an example:


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

var example = require('acceleratd.api.module');

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

api.useModels([
	[example.key, example.model]
]);

api.useRoutes([
	[example.key, example.route]
]);

api.run();

FAQs

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