Skip to content

Latest commit

 

History

History
113 lines (70 loc) · 2.09 KB

README.md

File metadata and controls

113 lines (70 loc) · 2.09 KB

Gomora

A progressive framework-agnostic API template following CLEAN architecture and SOLID principles. DDD inspired :)

Introduction

Gomora provides the example for a module-based gRPC and REST server suitable for building progressive APIs (from monolith to distributed microservices).

Screen Shot 2024-10-07 at 9 43 31 AM Screen Shot 2024-10-07 at 9 41 10 AM Screen Shot 2024-10-07 at 9 44 17 AM Screen Shot 2024-10-07 at 9 46 05 AM

Local Development

Setup the .env file first

cp .env.example .env

To bootstrap everything, run:

make

The command above will install, build, and run the binary

For manual install:

make install

For lint:

make lint

Just ensure you installed golangci-lint.

To test:

make test

For manual build:

make build

# The output for this is in bin/

Docker Build

To build, run:

make run

To run the container:

make up

Database Migration

Gomora uses go-migrate (https://github.com/golang-migrate/migrate) to handle migration. Download and change your migrate database command accordingly.

To create a schema, run:

make schema NAME=<init_schema>

To migrate up, run:

STEPS=<remove STEPS to apply all or specify step number> make migrate-up

To migrate down, run:

STEPS=<remove STEPS to apply all or specify step number> make migrate-down

To check migrate version, run:

make migrate-version

To force migrate, run:

STEPS=<specify step number> make migrate-force

License

MIT

Made with ❤️ at Nuxify