capishe
Helpers and handlers for building jsonp APIs in express
example
The following examples assume this:
// express 'app' availablevar capishe = ;
noops
Send a noop:
// res.jsonp({}) is sentapp;
With custom data:
// res.jsonp({ hello: 'world' }) is sentapp;
database
Send data from db with appropriate 200, 500 or 404:
app;
checks
Check for the presence of a particular URL parameter:
// calls next() becuase presentapp;
400 errors becuase of missing parameter
app;
install
npm install capishe
license
MIT