[Note: This repo is under progress]
The aim of this project is to create template layout and project for getting started wit REST API development using golang.
- For database: postgres
- For database connection & handling: gorm
- For logging: logrus
- For api development: gorilla
- Linux system
- Docker
- golang 1.19 version
- create docker container for DB using following command.
docker run --name some-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
- Export following environment variables.
export DB_USERNAME=postgres
export DB_PASSWORD=postgres
export DB_HOST=localhost
export DB_PORT=5432
export DB_TABLE=postgres
- execute below command to start the application.
go run cmd/server/main.go