Skip to content

Instantly share code, notes, and snippets.

@adam-hert
Created June 2, 2017 18:44
Show Gist options
  • Save adam-hert/882b73787d87359f09287dcd225e805a to your computer and use it in GitHub Desktop.
Save adam-hert/882b73787d87359f09287dcd225e805a to your computer and use it in GitHub Desktop.
hapi + traceview
'use strict';
var tv = require('traceview');
tv.traceMode = 'always';
const Hapi = require('hapi');
const server = new Hapi.Server();
server.connection({ port: 3000, host: 'localhost' });
server.route({
method: 'GET',
path: '/',
handler: function (request, reply) {
reply('Hello, world!');
}
});
server.start((err) => {
if (err) {
throw err;
}
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