From 059d723ef1943cc3d79f113fb9f34eadd2c02056 Mon Sep 17 00:00:00 2001 From: Raghu-Ch Date: Mon, 10 Sep 2018 13:44:52 -0400 Subject: [PATCH] updates for heorku deploy --- package.json | 7 +++++-- server.js | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7122074..c1c956f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "build": "ng build", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "postinstall": "ng build --aot -prod" }, "private": true, "dependencies": { @@ -29,7 +30,9 @@ "path": "^0.12.7", "rxjs": "^6.3.0", "typescript": "~2.9.0", - "zone.js": "^0.8.26" + "zone.js": "^0.8.26", + "@angular/cli": "~6.1.5", + "@angular/compiler-cli": "^6.0.0" }, "devDependencies": { "@angular/compiler-cli": "^6.0.0", diff --git a/server.js b/server.js index f122a83..3089c13 100644 --- a/server.js +++ b/server.js @@ -5,12 +5,12 @@ const path = require('path'); const app = express(); // Serve only the static files form the dist directory -app.use(express.static(path.join(__dirname + 'dist'))); +app.use(express.static(__dirname + '/dist/zid')); app.get('/*', function (req, res) { - res.sendFile(path.join(__dirname + 'dist/index.html')); + res.sendFile(path.join(__dirname + '/dist/zid/index.html')); }); // Start the app by listening on the default Heroku port -app.listen(process.env.PORT || 8080); +app.listen(process.env.PORT || 8080); \ No newline at end of file