Skip to content

Instantly share code, notes, and snippets.

@sean3z
Created April 13, 2017 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sean3z/217575b08e6edbd749e729d65768397d to your computer and use it in GitHub Desktop.
Save sean3z/217575b08e6edbd749e729d65768397d to your computer and use it in GitHub Desktop.
Example Node.js server (Restify)
"use strict";
const restify = require('restify');
const app = restify.createServer();
app.use(restify.queryParser());
app.use(restify.bodyParser());
app.get('/', (req, res, next) => {
res.send('Hello, world!');
});
app.listen(8080, () => {
console.log('%s listening at %s', app.name, app.url);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment