Working on hapi.d.ts

This commit is contained in:
Jakub Olek
2014-08-25 14:23:42 +02:00
parent 3505d15d99
commit 5d61f02af8
3 changed files with 449 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
/// <reference path="hapi.d.ts" />
import Hapi = require('hapi');
// Create a server with a host and port
var server = Hapi.createServer('localhost', 8000);
// Add the route
server.route({
method: 'GET',
path: '/hello',
handler: function (request, reply) {
reply('hello world');
}
});
// Start the server
server.start();