Skip to content

Instantly share code, notes, and snippets.

@predic8
Last active September 17, 2017 19:04
Show Gist options
  • Save predic8/7fe632374f2039d607e0c9717af7ca7b to your computer and use it in GitHub Desktop.
Save predic8/7fe632374f2039d607e0c9717af7ca7b to your computer and use it in GitHub Desktop.
'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