Skip to content

floydjones1/fiber-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Web Server Demo (go-fiber) license GitHub go.mod Go version of a Go module

This app is to be used as a boiler plate for a golang web server using go-fiber to drive the major piece. Creation of routes and handlers should look familiar if you ever have ever made an express web server. Now given that it follows express that doesn't mean you should follow javascript standards here. This is still GoLang, so things are different intentionally.

Why I think this makes a really good starting point?

  1. go-fiber has amazing benchmarks for performance and has other supporting modules that are available for JWT auth, swagger docs, rate limiter and more!
  2. XORM is a well balanced client which can be used as an ORM or raw queries when you need it.
  3. XORM also has built in caching to help performance if needed.
  4. Goose allows to write migrations in both SQL and go. (others might to it aswell)
  5. Follows Golang widely accepted folder structure conventions.

More to know

This app was made to be usable on both Windows and Mac. make isn't available by default on Windows but you can install it regardless

Other pieces of tools used are:

go-fiber <--- Web Server
xorm <-- ORM/Database Client
goose <-- Database Migration
zeroLog <-- Logging
modd <-- Live Reload
docker <-- dev environment
postgres <-- Database
make <-- dev tool

How to start App?

make tools <-- Downloads required go binaries
make up <-- Startup Postgres 
make start <-- Runs go-fiber

How to run test?

go generate ./...
go test ./...

Package Structure inspiration was taken from

  1. Standard Go Project Layout
  2. Package Oriented Design

About

The ultimate Go webserver setup 🔥

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors