aboutsummaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorjw2552018-01-10 10:20:00 +0000
committerjw2552018-01-10 10:20:00 +0000
commit2bf69ffbafc342b1ab1999a8a43811b6a22d6208 (patch)
treec385b4b2a98fcf446486ad3f190b43459be6bf6c /dist
parentTODO.md should now render properly on GitLab (diff)
downloadmedicine-2bf69ffbafc342b1ab1999a8a43811b6a22d6208.tar.gz
medicine-2bf69ffbafc342b1ab1999a8a43811b6a22d6208.zip

barebone .ts node server. pushing to see if all dependencies are included and if it runs on the host server

Diffstat (limited to 'dist')
-rw-r--r--dist/app.js19
-rw-r--r--dist/index.js11
2 files changed, 30 insertions, 0 deletions
diff --git a/dist/app.js b/dist/app.js
new file mode 100644
index 0000000..7e34ef9
--- /dev/null
+++ b/dist/app.js
@@ -0,0 +1,19 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const express = require("express");
+class App {
+ constructor() {
+ this.express = express();
+ this.mountRoutes();
+ }
+ mountRoutes() {
+ const router = express.Router();
+ router.get('/', (req, res) => {
+ res.json({
+ message: 'Hello World!'
+ });
+ });
+ this.express.use('/', router);
+ }
+}
+exports.default = new App().express;
diff --git a/dist/index.js b/dist/index.js
new file mode 100644
index 0000000..9392034
--- /dev/null
+++ b/dist/index.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+console.log('Hello, TypeScript!');
+const app_1 = require("./app");
+const port = process.env.PORT || 3000;
+app_1.default.listen(port, (err) => {
+ if (err) {
+ return console.log(err);
+ }
+ return console.log(`server is listening on ${port}`);
+});