mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-12 12:10:44 +08:00
Working on hapi.d.ts
This commit is contained in:
@@ -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();
|
||||
Reference in New Issue
Block a user