Skip to content

Knorcedger/apier-responsebuilder

Repository files navigation

apier-responsebuilder Build Status

Builds and sends the response of apier.

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install apier-responsebuilder --save

API

init()

Used as middleware to initialize the response (that we will send at the end)

send(req, res, data)

req

Type: Object The request object

res

Type: Object The response object

data

Type: any The data to send as response

error(req, res, errorCode)

req

Type: Object The request object

res

Type: Object The response object

errorCode

Type: String The errorCode to send as response

Tests

npm install
npm test

Dependencies

  • reqlog: A simple Node.js logger. Very closely attached to a request.

Dev Dependencies

License

MIT

Generated by package-json-to-readme

About

Builds and sends the response of apier

Resources

License

Stars

Watchers

Forks

Packages

No packages published