diff options
| author | jw255 | 2018-01-16 17:33:58 +0000 |
|---|---|---|
| committer | jw255 | 2018-01-16 17:33:58 +0000 |
| commit | 4cd8de869d493d95343ee09a186ac94ef6ce2bf4 (patch) | |
| tree | 1e33914f48f222992a8ba2332fdd984c741fe0a4 /dist/app.js | |
| parent | updated readme, todo to explain/include changes. wrote a test for helloworld.... (diff) | |
| download | medicine-4cd8de869d493d95343ee09a186ac94ef6ce2bf4.tar.gz medicine-4cd8de869d493d95343ee09a186ac94ef6ce2bf4.zip | |
added router class to handle API calls and updated TODO with latest Protocol decisions available
Diffstat (limited to 'dist/app.js')
| -rw-r--r-- | dist/app.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/dist/app.js b/dist/app.js index e983ca8..5d7bc52 100644 --- a/dist/app.js +++ b/dist/app.js @@ -3,6 +3,7 @@ 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(); @@ -15,14 +16,16 @@ class App { this.express.use(bodyParser.json()); this.express.use(bodyParser.urlencoded({ extended: false })); } + // Configure API endpoints. mountRoutes() { - const router = express.Router(); - router.get('/', (req, res) => { + const defRouter = express.Router(); + defRouter.get('/', (req, res) => { res.json({ - message: 'Hello World!' + message: 'Welcome to the CS3099 BE4 server!' }); }); - this.express.use('/', router); + this.express.use('/', defRouter); + this.express.use('/cs3099group-be-4/files/directory', FileRouter_1.default); } } exports.default = new App().express; |
