This is a starter project for using Go Chi with Clean Architecture.
To get started with the project, please create .env file based on the .env.example. and setup a few depencies like postgres and redis.
First, install necessary dependencies
go mod tidy
To run the project
go run cmd/main.go
To run with live reload make sure you have nodemon
installed globally using npm install -g nodemon
, and then run with:
make live
for migrations we are using golang-migrate https://github.com/golang-migrate/migrate and please check Makefile
to see available command to do Migrations.
and dont forget to change postgresconn
value with your database url.
just please Find and replace github.com/joisandresky/go-chi-clean-starter
with your project name (go modules).
(Update 5 November 2024) Now we are using https://github.com/google/wire for Dependency Injection. please check this file:
Run this to generate the wire.go file:
make wire