Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document how to setup vue on heroku #3607

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 35 additions & 1 deletion docs/guide/deployment.md
Expand Up @@ -261,7 +261,41 @@ npm install -g now

### Heroku

> TODO | Open to contribution.
1. Do the general Heroku setup, by following the instructions on [heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs). In short:
- Create heroku account https://signup.heroku.com/signup/dc
- Install the heroku CLI; login; create the heroku project
```bash
sudo snap install heroku --classic
heroku login
heroku create your-awesome-vue-app-name
```
2. Ensure the build and start scripts are configured
- This example uses *serve* to expose the /dist directory using the dynamically provided heroku-PORT
```json
{
"name": "your-awesome-vue-app-name",
"version": "0.1.0",
"scripts": {
"start": "./node_modules/serve/bin/serve.js -s dist/ -l $PORT",
"build": "vue-cli-service build",
"heroku-postbuild": "yarn build"
},
"dependencies": {
"serve": "^10.1.2",
"vue": "^2.6.8"
},
"devDependencies": {
"@vue/cli-service": "^3.4.0",
"vue-template-compiler": "^2.5.21"
},
"heroku-run-build-script": true
}
```

3. Push your git repo to heroku
```bash
git push heroku master
```

### Surge

Expand Down