chenxq / reading-club-backend

Backend component for reading club

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reading-club-backend

Backend component for reading club

Deploy steps(on heroku)

  • 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/).

Run locally

Environment

  • Postgres version 9+
  • Golang 1.12.3

Steps to run

  • 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/

Run with Docker

Steps to run with Docker

  • Install Docker
  • Build the image
docker-compose build
  • Run the container
docker-compose up
  • access localhost:9000 on the web browser

About

Backend component for reading club


Languages

Language:Go 97.4%Language:Dockerfile 1.3%Language:Makefile 0.8%Language:Shell 0.5%