Skip to content

Instantly share code, notes, and snippets.

@seanpmaxwell
Last active May 29, 2019 05:28
Show Gist options
  • Save seanpmaxwell/e816131d571b3bb29a566b7178ac72df to your computer and use it in GitHub Desktop.
Save seanpmaxwell/e816131d571b3bb29a566b7178ac72df to your computer and use it in GitHub Desktop.
TypeScriptFullStackShell/src/controllers/shared/TestServer.test.ts
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