Added first hapi TS tests

This commit is contained in:
BorntraegerMarc
2017-12-04 09:34:47 +01:00
parent 8a7380e075
commit cb5d8da22f
4 changed files with 24 additions and 13 deletions
-12
View File
@@ -1,12 +0,0 @@
import {Server, ServerOptions} from "hapi";
const options:ServerOptions = {
port: 8000
}
const server = new Server(options);
server.start();
console.log('Server started at: ' + server.info.uri);
@@ -0,0 +1,11 @@
// From https://hapijs.com/tutorials/getting-started#creating-a-server
import { Server, ServerOptions } from 'hapi';
const options: ServerOptions = {
port: 8000,
};
const server = new Server(options);
server.start();
console.log('Server started at: ' + server.info.uri);
+12
View File
@@ -0,0 +1,12 @@
// Type definitions for hapi 17.0
// Project: https://github.com/hapijs/hapi
// Definitions by: Marc Bornträger<https://github.com/BorntraegerMarc>
// Rafael Souza Fijalkowski <https://github.com/rafaelsouzaf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Note/Disclaimer: None.
/// <reference types="node" />
/** Getting Started */
export * from './getting-started/01-creating-a-server';
+1 -1
View File
@@ -23,6 +23,6 @@
},
"files": [
"index.d.ts",
"hapi-tests.ts"
"test/index.test.d.ts"
]
}