apier-responsebuilder

1.1.1 • Public • Published

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

/apier-responsebuilder/

    Package Sidebar

    Install

    npm i apier-responsebuilder

    Weekly Downloads

    10

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • knorcedger