It is an easy project to practice the integration between vue, vuex and Element.ui.
npm install
npm run serve
npm run build
- Create server.js file on your root app's directory.
- Sure that "express" and "serve-static" dependencies are installed.
- Install heroku on your machine (instructions) --> https://devcenter.heroku.com/articles/heroku-cli
- Heroku steps (do the next steps on your terminal).
- heroku login
- heroku create vue-todo-app
- git init (Only if your project not have git repo)
- heroku git:remote -a vue-todo-app
- git add .
- git commit -am "Heroku deployment"
- git push heroku master
- Your app is ready you can see all heroku steps on heroku's documentation.
My app on heroku: https://vue-todo-test.herokuapp.com/
- Fork this repository (with the Layerfile).
- Create a free account at webapp.io.
- Install webapp.io on your GitHub.
- Make sure that webapp.io has access to this forked repository.
- Push to your forked repository.
- Force push to the master branch if needed.
- Wait for the Layerfile to finish running on the "Recent Commits" page
- Click on the "Deploy" button after the Layerfile finishes successfully, and select a domain to deploy to.
For more information, check out the webapp.io docs on hosting.
To have github pages on any vue project:
- deploy.sh file --> Add this file to root app's folder.
#!/usr/bin/env sh
# abort on errors
set -e
# build
npm run build
# navigate into the build output directory
cd dist
# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# if you are deploying to https://<USERNAME>.github.io
# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f git@github.com:OussamaAlouat/vue-todo-app.git master:gh-pages
cd -
- vue.config.js --> Add this file to root's app. (I decide put '/vue-todo-app' because is my github project name. You put there your github project name)
module.exports = {
baseUrl: process.env.NODE_ENV === 'production'
? '/vue-todo-app/'
: '/'
}