- Set up Install git, Heroku Command Line Interface and go
- Prepare the app Clone this repository to your machine.
git clone https://github.com/LeasyZhang/reading-club-backend.git
cd reading-club-backend
- Create heroku account Go to https://www.heroku.com and register an account
- Deploy on heroku Firstly create an app(it will generate a random name, you can specify the name by passing the parameter )
heroku create
Now Deploy your code
git push heroku master
The application is now deployed. Visit the app URL generated by it's app name(https://your-app_name.herokuapp.com/).
- Postgres version 9+
- Golang 1.12.3
- Install and setup required tools
- Execute sql script under database/scripts/*.sql
- Run following go code to start
go run main.go
After application startup, visit http://localhost:8080/
- Install Docker
- Build the image
docker-compose build
- Run the container
docker-compose up
- access localhost:9000 on the web browser