Skip to content

fathoor/go-modular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go REST API Boilerplate

Go PostgreSQL

This is a boilerplate project for building a Modular REST API in Go, aimed to speed up the process of starting a new project and structuring the app.


It uses the following major libraries:

Usage

Make sure to refactor the go module in go.mod with your corresponding module.

A .env.example file is provided in the root directory. Copy it to .env and adjust the values to your needs.

# App
APP_DEBUG=
APP_PORT=

# Database
DB_DSN="database://user:password@host:port/dbname?sslmode=&TimeZone="
DB_CONN_OPEN=
DB_CONN_IDLE=
DB_CONN_LIFETIME=

To initialize new modules, run the following command:

go run scripts/module.go <module name>

To initialize new submodules, run the following command:

go run scripts/submodule.go <module name> <submodule name>

To run the app, execute the following command:

go run cmd/app/main.go

About

Go Boilerplate for REST API with Clean Modular Architecture

Topics

Resources

License

Stars

Watchers

Forks

Languages