Skip to content

Instantly share code, notes, and snippets.

@nlf
Created January 12, 2014 01:18
Show Gist options
  • Save nlf/8379292 to your computer and use it in GitHub Desktop.
Save nlf/8379292 to your computer and use it in GitHub Desktop.
var Hapi = require('hapi');
var serverOptions = {
views: {
engines: {
jade: 'jade'
},
path: 'views'
}
};
var server = new Hapi.Server('127.0.0.1', 8000, serverOptions);
server.route({
method: 'get',
path: '/',
handler: function (request, reply) {
reply.view('hello');
}
});
server.start(function () {
console.log('Server running at:', server.info.uri);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment