UNPKG

makemehapi

Version:

Self guided workshops to teach you about hapi.

10 lines 274 B
var Hapi = require('hapi'); var server = Hapi.createServer('localhost', Number(process.argv[2] || 8080)); server.route({ method: 'GET', path: '/{name}', handler: function (request, reply) { reply('Hello ' + request.params.name); } }); server.start();