Golang/Fiber codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API. Project based on RealWorld example for Golang/Echo
This codebase was created to demonstrate a fully fledged fullstack application built with Golang/Fiber including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Golang/Fiber community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
Before quick start you must install docker, docker-compose and Git.
Starts ready docker container
mkdir database && chmod o+w ./database && docker run -d -p 8585:8585 -v $(pwd)/database:/myapp/database alpody/golang-fiber-real-world
Builds and tests
git clone https://github.com/alpody/golang-fiber-realworld-example-app.git
cd golang-fiber-realworld-example-app
chmod a+x start.sh
./start.sh
Press Ctrl + c
for stop application.
See asciinema this process:
Please check the official golang installation guide before you start. Official Documentation Also make sure you have installed a go1.11+ version.
make sure your ~/.*shrc have those variable:
➜ echo $GOPATH
/Users/xesina/go
➜ echo $GOROOT
/usr/local/go/
➜ echo $PATH
...:/usr/local/go/bin:/Users/alpody/test/bin:/usr/local/go/bin
For more info and detailed instructions please check this guide: Setting GOPATH
Clone this repository:
➜ git clone https://github.com/alpody/golang-fiber-realworld-example-app.git
Or simply use the following command which will handle cloning the repo:
➜ go get -u -v github.com/alpody/golang-fiber-realworld-example-app
Switch to the repo folder
➜ cd $GOPATH/src/github.com/alpody/golang-fiber-realworld-example-app
If you had installed make utility, you can simply run and select command.
make help
➜ go mod download
➜ go run main.go
➜ go build
➜ go test ./...
Open url http://localhost:8585/swagger/index.html in browser.