In this project are already included an integration with database, Currently it's available for (Mysql, PostgreSQL). It's might be usefull to know that libraries that I've used on this Project:
- Gorm -> ORM
- GoMock -> Test
- DotEnv -> Environment Variables
- zerolog -> Logging
- Goose -> Migration
- Go installed on your machine
-
Clone the repository:
git clone https://github.com/elhardian/go-clean-architecture.git
-
Go to Project Directory:
cd go-clean-architecture
-
Setup The Project Setup project is includes
install dependencies
andrun migrations
.make setup
by default, above command is using your
libs/config/local.env
. If you need to setup other env, You must define argumentsENV
, so the command will looks like this:make ENV=dev setup
To run the application, use the following command:
make run