mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
I have no idea how to do union types for properties
and how to use node modules
This commit is contained in:
+9
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user