Created
April 13, 2017 18:58
-
-
Save sean3z/217575b08e6edbd749e729d65768397d to your computer and use it in GitHub Desktop.
Example Node.js server (Restify)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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