Created
June 2, 2017 18:44
-
-
Save adam-hert/882b73787d87359f09287dcd225e805a to your computer and use it in GitHub Desktop.
hapi + traceview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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