Skip to content

Commit 939666e

Browse files
authored
Merge pull request #15 from denOldTimer/chapter-ten
deploy to heroku
2 parents a00eadb + 7c116e2 commit 939666e

4 files changed

Lines changed: 40 additions & 2 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ Lifecycle hooks : { [beforeCreated], [created], [beforeMount], [mounted],
241241

242242
---
243243

244+
## Advanced : Chapter 10 : Deploying to Heroku
245+
246+
3. **DOWNLOAD** **[release 1.7.0](https://github.com/denOldTimer/releases/1.10.0)**
247+
248+
---
249+
244250
[data]: https://v3.vuejs.org/api/options-data.html#data-2
245251
[props]: https://v3.vuejs.org/api/options-data.html#props
246252
[computed]: https://v3.vuejs.org/api/options-data.html#computed

package-lock.json

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
"@vue/cli-service": "~4.5.0",
2424
"@vue/compiler-sfc": "^3.0.0",
2525
"babel-eslint": "^10.1.0",
26+
"connect-history-api-fallback": "^1.6.0",
2627
"eslint": "^6.7.2",
2728
"eslint-plugin-vue": "^7.0.0-0",
29+
"express": "^4.17.1",
30+
"express-sslify": "^1.2.0",
2831
"sass": "^1.32.8",
29-
"sass-loader": "^10.1.1"
32+
"sass-loader": "^10.1.1",
33+
"serve-static": "^1.14.1"
3034
},
3135
"eslintConfig": {
3236
"root": true,

server.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const express = require("express");
2+
const serverStatic = require("serve-static");
3+
const history = require("connect-history-api-fallback");
4+
const enforce = require("express-sslify");
5+
6+
const app = express();
7+
8+
app.use(enforce.HTTPS({ trustProtoHeader: true }));
9+
app.use(serveStatic(__dirname + "/dist"));
10+
app.use(history());
11+
12+
app.listen(process.eventNames.PORT || 5000);

0 commit comments

Comments
 (0)