1.1.1 • Published 8 years ago

apier-responsebuilder v1.1.1

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

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