Go vue Starter Kit for Heroku.
View online demo (API), Inspired by React firebase starter.
Tech Stack
Also, you need to be familiar with HTML, CSS, JavaScript (ES2015) and Vue.
Prerequisites
Getting Started
Just clone the repo, update environment variables in .env
and/or .env.local
file, and start
hacking:
$ go get bitbucket.org/liamstask/goose/cmd/goose
$ go get -u -t github.com/volatiletech/sqlboiler
$ go get github.com/snapiz/go-vue-starter
$ cd ~/go/src/github.com/snapiz/go-vue-starter
# Setup
$ yarn install
$ yarn db:up
# Serve
$ yarn start
Then open http://localhost:9000/ to see your app.
How to Migrate Database Schema
$ yarn db:migration AddSomeColumns sql # Create a new database migration file
$ yarn db:up # Migrate database to the latest version
$ yarn db:down # Rollback the latest migration
$ yarn db:models # Generate models from db
How to Test
$ yarn test:api # Run unit tests for server
$ yarn test:unit # Run unit tests.
$ yarn test:e2e # Run end-to-end tests.
How to Deploy
- Create a new heroku project and postgres database.
- Configure heroku environement variables by running
heroku config:set APP_ENV=production
and for all variables in .env.
- Configure Netlify
netlify.toml
with your own redirect domain or create web/public/_redirects
.
- Deploy your application by running
yarn deploy
.
- Migrate your database schema if needed by running
yarn heroku:db:up
.
License
Copyright © 2019 snapiz. This source code is licensed under the MIT license found in
the LICENSE file.