updates for heorku deploy

This commit is contained in:
Raghu-Ch
2018-09-10 13:44:52 -04:00
parent 6f4770fb6f
commit 059d723ef1
2 changed files with 8 additions and 5 deletions

View File

@@ -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",

View File

@@ -5,11 +5,11 @@ 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