Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253var Hapi = require('hapi');var Good = require('good');
// Create a server with a host and portvar server = new Hapi.Server();server.connection({ host: 'localhost', port: 8000});
// Add the route
server.route({ method: 'GET', path: '/webgl', handler: function(request, reply) { reply.file("webgl.html") }});
server.route({ path: "/assets/{param*}", method: "GET", handler: { directory: { path: "assets" } }});
server.register([{ register: Good, options: { reporters: [{ reporter: require('good-console'), args: [{ log: '*', response: '*' }] }] }}, { register: require('./assets/js/plugins/socketio')}], function(err) { if (err) { //throw err; // something bad happened loading the plugin }
server.start(function() { server.log('info', 'Server running at: ' + server.info.uri); });});