Skip to content

Instantly share code, notes, and snippets.

@kazagkazag
Created April 26, 2018 19:05
Show Gist options
  • Save kazagkazag/9e9fde2cfd397eeedc29f4d4d8bbfd0d to your computer and use it in GitHub Desktop.
Save kazagkazag/9e9fde2cfd397eeedc29f4d4d8bbfd0d to your computer and use it in GitHub Desktop.
const restify = require("restify");
// create server instance
const server = restify.createServer();
// use plugins to parse body and query string of incoming requests
server.use(restify.plugins.queryParser());
server.use(restify.plugins.bodyParser());
// start listening
server.listen(4000, () => console.log("Up and running on port 4000"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment