robertmarsal / go-live-reload

Production ready boilerplate with live-reloading development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Live Reload

Production ready boilerplate with live-reloading development

Read this article first

Using with Docker

Start production enviroment

$ docker-compose up -d production
// View logs
$ docker-compose logs --tail 100 -f production

Start development enviroment

$ docker-compose up dev

Re-building docker

$ docker-compose build --no-cache

Attach to bash

$ docker-compose exec <production|development> sh

Example

After running docker-compose open:

development: http://localhost:8080/

production: http://localhost:8081/

Without docker

$ make serve

You may need to execute go mod download in src folder first

Configure scripts

./scripts/production.sh

cd src 
go mod download
go build -o /bin/app && /bin/app

./scripts/development.sh`

cd src
go run main.go

About

Production ready boilerplate with live-reloading development


Languages

Language:Dockerfile 40.4%Language:Makefile 30.7%Language:Go 22.9%Language:Shell 6.0%