@wbg-mde/express-io
Version:
MDE communication channel with Socket IO and express.
24 lines • 767 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const express = require("express");
const bodyParser = require("body-parser");
const routes_1 = require("./routes");
class App {
constructor() {
this.appRoutes = new routes_1.AppRoutes();
this.app = express();
this.config();
this.registerRoutes();
}
config() {
// support application/json type post data
this.app.use(bodyParser.json());
//support application/x-www-form-urlencoded post data
this.app.use(bodyParser.urlencoded({ extended: false }));
}
registerRoutes() {
this.appRoutes.routes(this.app);
}
}
exports.default = new App().app;
//# sourceMappingURL=app.js.map