This repository is a fullstack golang sample project. This repo includes Golang along with postgres database and Lit element as UI framework. This is going to be awesome!!
- Update readme
- Unit and integration test along with test architecture
- singleton
- Sample Todo working app with test sample.
- cmd : Common commands, CLI Executables
- cmd/server: App Server entry-point
- config : App configurations based on AppMode
- docs: Docs related files
- pkg/config: Common Application Config module
- pkg/helpers: Common helpers
- pkg/middleware: Middleware for Http servers
- pkg/model: Database/Json entities
- pkg/repository: Database repositories
- sql: SQL init scripts
- templates: Application templates
- ui: UI static files
Navigate to env folder and create files pattern application.{APP_MODE}.env Here {APP_MODE} is different profile.
docker compose up
-
Local
go run ./cmd/server
-
Prod other env
APP_MODE={env} go run ./cmd/server ## Example prod APP_MODE=prod go run ./cmd/server
-
Using
make
commandmake run ## Dev mode make dev
You can set diff log level using env variable LOG_LEVEL={debug,info,warn,error}
in environment
filesapplication.env. The default is LOG_LEVEL=info
.
APP_VERSION=1.0.0
LOG_LEVEL=error
To run application, You need to run postgres database. You can easily do that using postgres
docker-compose up --build -d
docker-compose up --build -d
docker compose stop
docker compose rm -f
docker exec -it 4c0f5f4acb0c /bin/sh