Skip to content

ansufw/bwago

Repository files navigation

bwago

building modern web application with Go

Prerequisite

  1. Go 1.18 or above
  2. Soda

How to use

  1. clone this repo, go to project directory
  2. migrate db soda migrate up
  3. run script ./run.sh
  4. open browser locahost:9000
  5. login admin email [email protected], password password

Using Docker

  1. build image docker build -t bwago:v1.0 .
  2. run container docker run --rm --env-file ./.env -p 9020:9000 bwago:v1.0

Using compose

  1. run docker compose up

Tips

Migrate down all steps

soda migrate down -s -1

Generate seed data

soda g sql SeedUsersTable

Run test

Test all packages

go test -coverpkg=./... ./...

Alternative command for testing

go test -v -cover  ./...

Test all packages with total percentage

go test --coverprofile=coverage.out ./... && go tool cover -func=coverage.out

Test all packages with total percentage and display in the browser

go test -coverprofile=coverage.out ./... && go tool cover -html=coverage.out

3rd party library

Motivation

this is a personal project and it is used for learning and educational purpose the content of this repo is adapted from https://www.udemy.com/course/building-modern-web-applications-with-go/

About

building modern web application with Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published