Skip to content

Commit

Permalink
serve fastboot app via heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoow committed Apr 6, 2020
1 parent 5e22c26 commit 789133d
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 943 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: yarn run start:fastboot
1 change: 1 addition & 0 deletions fastboot-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const FastBootAppServer = require('fastboot-app-server');

let server = new FastBootAppServer({
distPath: 'dist',
port: process.env.PORT || 3000,
gzip: true // Optional - Enables gzip compression.
});

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"changelog": "lerna-changelog",
"diagrams": "mermaid --sequenceConfig guides/assets/esa-initial-flow.config.json --width 2400 -o guides/assets guides/assets/esa-initial-flow.txt",
"lint": "eslint app addon blueprints config server tests *.js",
"now-build": "ember build --environment=production",
"now-start": "NODE_ENV=production PORT=8000 node fastboot-server.js",
"start": "ember serve",
"start:fastboot": "NODE_ENV=production node fastboot-server.js",
"start:demo-api": "node server/demo-api.js",
"test": "ember test",
"test:all": "ember try:each",
"test:one": "ember try:one",
Expand All @@ -41,11 +41,11 @@
"silent-error": "^1.0.0"
},
"devDependencies": {
"body-parser": "^1.17.2",
"body-parser": "^1.19.0",
"bootstrap": "^4.3.1",
"broccoli-asset-rev": "^3.0.0",
"chai": "^4.1.0",
"cors": "^2.8.4",
"cors": "^2.8.5",
"ember-ajax": "^5.0.0",
"ember-bootstrap": "~3.1.0",
"ember-cli": "~3.17.0",
Expand Down Expand Up @@ -82,17 +82,17 @@
"eslint-plugin-ember": "^8.1.1",
"eslint-plugin-mocha": "^6.1.1",
"eslint-plugin-node": "^11.0.0",
"express": "^4.15.3",
"express": "^4.17.1",
"fastboot-app-server": "^2.0.0",
"git-repo-version": "^1.0.0",
"glob": "^7.1.2",
"glob": "^7.1.6",
"handlebars": "~4.7.1",
"lerna-changelog": "^1.0.0",
"loader.js": "^4.5.1",
"marked": "^0.8.0",
"mermaid": "^7.0.3",
"mocha": "^7.0.1",
"morgan": "^1.8.2",
"morgan": "^1.10.0",
"my-engine": "./tests/dummy/lib/my-engine",
"now": "^17.0.1",
"rimraf": "^3.0.0",
Expand Down
1 change: 1 addition & 0 deletions server/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: yarn run start:demo-api
4 changes: 2 additions & 2 deletions server/app.js → server/demo-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var app = express();
// eslint-disable-next-line no-unused-vars
var server = require('./index.js')(app);

app.listen(3000, function() {
app.listen(process.env.PORT, function() {
// eslint-disable-next-line no-console
console.log('Server started on port 3000');
console.log('Server started on port ' + process.env.PORT);
});
19 changes: 0 additions & 19 deletions server/package.json

This file was deleted.

Loading

0 comments on commit 789133d

Please sign in to comment.