A minimalistic REST-api framework to scaffold backend api using google's go
A helper I made to (hopefully) simplify API scaffolding process
Current Version: 1.1.0
- ORM (github.com/jinzhu/gorm)
- Default middlewares (logging and error handling)
- Middleware Chaining (github.com/justinas/alice)
- Mux (github.com/gorilla/mux)
- Compile-Time Dependency Injection (github.com/google/wire)
- Scalable configurations for development, testing and production
- JWT
- Make sure you have go, and the standard packages installed in your system. For guidance, head to golang guide
- Configure $GOPATH in your system. Try running
echo $GOPATH
(unix) in your terminal
It should print out something like /path/to/the/goworkspace
Get retsgo package
go get github.com/fernandochristyanto/retsgo
Run retsgo -v
it should print out the version number (if it does not, try restarting your terminal)
Create a new directory to hold your project, e.g:
mkdir -p $GOPATH/src/github.com/mygithubusername/newprojectname
Generate a new project
retsgo newproject github.com/mygithubusername/newprojectname