Skip to content

Instantly share code, notes, and snippets.

@AdriVanHoudt
Last active May 8, 2017 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdriVanHoudt/616f7fdcd4c9334e742c6fd8b705dfd1 to your computer and use it in GitHub Desktop.
Save AdriVanHoudt/616f7fdcd4c9334e742c6fd8b705dfd1 to your computer and use it in GitHub Desktop.
Glimpse + hapi = not a hapi server
'use strict';
if (process.env.NODE_ENV !== 'production') {
require('@glimpse/glimpse').init();
}
const Hapi = require('hapi');
const server = new Hapi.Server();
server.connection();
server.route({
method: 'GET',
path: '/world',
handler: (request, reply) => {
return reply('Hello world');
}
});
server.start((err) => {
if (err) {
throw err;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment