Skip to content

Commit

Permalink
Initial heroku commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vkaruri committed Dec 16, 2017
1 parent b8b4e6d commit 24d4559
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
18 changes: 12 additions & 6 deletions angular-gallery-app/gallery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"start": "node server.js",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"postinstall": "ng build --aot --target=production"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/cli": "1.6.0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
Expand All @@ -23,14 +26,14 @@
"@angular/router": "^5.0.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"express": "^4.16.2",
"ngx-alerts": "^1.2.1",
"ngx-bootstrap": "^2.0.0-rc.0",
"rxjs": "^5.5.2",
"typescript": "~2.4.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.6.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
Expand All @@ -46,7 +49,10 @@
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
"tslint": "~5.7.0"
},
"engines": {
"node": "6.10.3",
"npm": "3.10.10"
}
}
14 changes: 14 additions & 0 deletions angular-gallery-app/gallery/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const express = require('express');
const app = express();
const path = require('path');

app.use(express.static(__dirname + '/dist'));

app.listen(process.env.PORT || 8080);


app.get('/*', function(req, res) {
res.sendFile(path.join(__dirname + '/dist/index.html'));
});

console.log('Console listening!');

0 comments on commit 24d4559

Please sign in to comment.