Skip to content

Instantly share code, notes, and snippets.

@gisthero
Created May 13, 2013 10:54
Show Gist options
  • Save gisthero/5567531 to your computer and use it in GitHub Desktop.
Save gisthero/5567531 to your computer and use it in GitHub Desktop.
Restify on Heroku
{
"name": "restify-example",
"version": "0.0.1",
"dependencies": {
"restify": "2.4.x"
},
"engines": {
"node": "0.10.x",
"npm": "1.2.x"
}
}
web: node rest.js
var restify = require("restify");
var server = restify.createServer();
function respond(req, res, next) {
res.send('Hello World!');
}
server.get('/', respond);
var port = process.env.PORT || 5000;
server.listen(port, function() {
console.log("Listening on " + port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment