Skip to content

ajaydeta/golang-clean-code-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang-clean-code-rest

About

This repository is implement clean code architecture and Restful API concept. Use Fiber Go as HTTP library and GORM for ORM library. For database, this app is use MySQL and redis for cache and session.

For database schema you can see in below: image

Prerequisite

  1. golang version 1.22.1
  2. MySql
  3. redis server

How To Start

Manual

  1. Setup MySQL and redis server in your local computer
  2. Clone this repository
    https://github.com/ajaydeta/golang-clean-code-rest.git
  3. Installing main project dependency
       go mod tidy
  4. Running the server
        go run main.go

Docker compose

  1. Setup MySQL and redis server in your local computer
  2. Clone this repository
    https://github.com/ajaydeta/golang-clean-code-rest.git
  3. Compose Up
    docker compose up --build

This app is running on port :3000

Testing

After this app is running, this app will automatically migrate DB schema and seed dummy data for testing purpose. Then you can see the API documentation in here.

Author

Ajay Deta:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published