diff options
| author | trh | 2018-02-02 16:44:22 +0000 |
|---|---|---|
| committer | trh | 2018-02-02 16:44:22 +0000 |
| commit | 1cbba971bbadda335c016d8a7dc0883aa1135bbc (patch) | |
| tree | 57c388e5c3750c3571f9d7f60a6810a02e1b4637 /dist/app.js | |
| parent | Merge branch 'trh/ts-node' into 'master' (diff) | |
| download | medicine-1cbba971bbadda335c016d8a7dc0883aa1135bbc.tar.gz medicine-1cbba971bbadda335c016d8a7dc0883aa1135bbc.zip | |
Tidied Some Repo Things
Diffstat (limited to 'dist/app.js')
| -rw-r--r-- | dist/app.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/dist/app.js b/dist/app.js deleted file mode 100644 index 5d7bc52..0000000 --- a/dist/app.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const express = require("express"); -const logger = require("morgan"); -const bodyParser = require("body-parser"); -const FileRouter_1 = require("./FileRouter"); -class App { - constructor() { - this.express = express(); - this.middleware(); - this.mountRoutes(); - } - // Configure Express middleware. - middleware() { - this.express.use(logger('combined')); - this.express.use(bodyParser.json()); - this.express.use(bodyParser.urlencoded({ extended: false })); - } - // Configure API endpoints. - mountRoutes() { - const defRouter = express.Router(); - defRouter.get('/', (req, res) => { - res.json({ - message: 'Welcome to the CS3099 BE4 server!' - }); - }); - this.express.use('/', defRouter); - this.express.use('/cs3099group-be-4/files/directory', FileRouter_1.default); - } -} -exports.default = new App().express; |
