Last active
May 29, 2019 05:28
-
-
Save seanpmaxwell/e816131d571b3bb29a566b7178ac72df to your computer and use it in GitHub Desktop.
TypeScriptFullStackShell/src/controllers/shared/TestServer.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as bodyParser from 'body-parser'; | |
import { Application } from 'express'; | |
import { Server } from '@overnightjs/core'; | |
class TestServer extends Server { | |
constructor() { | |
super(); | |
this.app.use(bodyParser.json()); | |
this.app.use(bodyParser.urlencoded({extended: true})); | |
} | |
public setController(ctlr: object): void { | |
super.addControllers(ctlr); | |
} | |
public getExpressInstance(): Application { | |
return this.app; | |
} | |
} | |
export default TestServer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment