Skip to content

pheynnx/GoFiber-Rest-API-Mongo_Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoFiber MongoDB Rest API Template

Demonstrates:

  • Full CRUD REST API
  • MongoDB native driver; no use of orm/odm
  • How to structure a production ready API (Model/Controller/Routes)
  • How to implement custom JSON schema validation (database/database.go)
  • How to implement custom collection indexes (database/database.go)

Start:

  • Make sure to setup environmental variables before running

Environmental Variables:

File Path: ./config/config.env

  • PORT
  • MONGO_URI

Run server:

go run server.go

Use fresh for hot reload:

go get github.com/pilu/fresh
fresh

Tools:

  • GoFiber v2
  • Mongo-driver

About

GoFiber MongoDB Rest API Template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages