Skip to content

andremartinsds/go_admin

Repository files navigation

Go Admin

Prerequisites

Make sure if air live-reloading is installed

Air is yet another live-reloading command line utility for developing Go applications. Run air in your project root directory, leave it alone, and focus on your code.

To install air you can execute the curl below

curl -sSfL https://raw.githubusercontent.com/air-verse/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin

How to start project with air

Note: to run with air right now we need run api without docker and database with docker

$ docker compose up
$ air

How to start project without air

$ docker compose up
go run cmd/server/main.go

Building with docker

  • Uncomment a block of lines at docker-compose
#  go-admin:
#    build:
#      context: .
#      dockerfile: ./Dockerfile
#    ports:
#      - 3333:8080
#    env_file:
#      - ./.env
#    networks:
#      - go-admin-network
#    depends_on:
#      mysql-go-admin:
#        condition: service_healthy
  • Build the image
docker build -t go_admin .
  • Run Project
docker run -p 8080:8080 go_admin

Running tests

go test ./...

About

Golang admin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages