Skip to content

Instantly share code, notes, and snippets.

View spikhoff's full-sized avatar

Sander Pikhoff spikhoff

View GitHub Profile
var restify = require('restify');
// create server
var server = restify.createServer();
// Blocks your chain on reading and parsing the HTTP request body.
// Switches on Content-Type and does the appropriate logic.
// application/json, application/x-www-form-urlencoded and multipart/form-data are currently supported.
server.use(restify.bodyParser({rejectUnknown: true}));