Skip to content

Instantly share code, notes, and snippets.

@mani95lisa
Created January 15, 2014 10:37
Show Gist options
  • Save mani95lisa/8434120 to your computer and use it in GitHub Desktop.
Save mani95lisa/8434120 to your computer and use it in GitHub Desktop.
var Hapi = require('hapi');
var internals = {};
internals.main = function () {
var server = new Hapi.Server(80, { files: { relativeTo: __dirname } });
server.route([
{ method: 'GET', path: '/{path*}', handler: { directory: { path: '/', listing:true } } },
{method: 'GET', path:'/', handler: {file:'/index.html'}}
]);
server.start();
};
internals.main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment