I have no idea how to do union types for properties

and how to use node modules
This commit is contained in:
Jakub Olek
2014-08-25 14:23:53 +02:00
parent 5d61f02af8
commit 60bc96cefb
2 changed files with 219 additions and 185 deletions
+9 -1
View File
@@ -9,10 +9,18 @@ var server = Hapi.createServer('localhost', 8000);
server.route({
method: 'GET',
path: '/hello',
handler: function (request, reply) {
handler: function (request: Hapi.Request, reply: Function) {
reply('hello world');
}
});
server.route([{
method: 'GET',
path: '/hello2',
handler: function (request: Hapi.Request, reply: Function) {
reply('hello world2');
}
}]);
// Start the server
server.start();