Last active
September 17, 2017 19:04
-
-
Save predic8/7fe632374f2039d607e0c9717af7ca7b to your computer and use it in GitHub Desktop.
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'; | |
const Hapi = require('hapi'); | |
const server = new Hapi.Server(); | |
server.connection({ | |
host: 'localhost', | |
port: 8000 | |
}); | |
server.route({ | |
method: 'GET', | |
path:'/books/', | |
handler: (req, reply) => { | |
return reply('Tut!'); | |
} | |
}); | |
server.start((err) => { | |
if (err) { | |
throw err; | |
} | |
console.log('Running @:', server.info.uri); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment