From 2bf69ffbafc342b1ab1999a8a43811b6a22d6208 Mon Sep 17 00:00:00 2001 From: jw255 Date: Wed, 10 Jan 2018 10:20:00 +0000 Subject: barebone .ts node server. pushing to see if all dependencies are included and if it runs on the host server --- src/app.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/app.ts (limited to 'src/app.ts') diff --git a/src/app.ts b/src/app.ts new file mode 100644 index 0000000..fe00367 --- /dev/null +++ b/src/app.ts @@ -0,0 +1,22 @@ +import * as express from 'express' + +class App { + public express + + constructor () { + this.express = express() + this.mountRoutes() + } + + private mountRoutes (): void { + const router = express.Router() + router.get('/', (req, res) => { + res.json({ + message: 'Hello World!' + }) + }) + this.express.use('/', router) + } +} + +export default new App().express \ No newline at end of file -- cgit v1.2.1