Go API boilerplate built with echo framework
Getting Started
Prerequisites
- Go 1.12 (skip if you use docker)
- MySQL 5.7 (skip if you use docker)
- direnv
External Service
- Twilio (for SMS authentication)
- SendGrid (for sending email)
Usage
- Clone repo
git clone https://github.com/k-yomo/go_echo_api_boilerplate.git
cd go_echo_api_boilerplate
-
Create .env
file in reference to .env.sample
-
Install dependent modules
go mod install
- Run dev server
// Listening on localhost:1323 with hot reloading(localhost:5002)
realize start --server
Usage with Docker
- Clone repo
git clone https://github.com/k-yomo/go_echo_api_boilerplate.git
cd go_echo_api_boilerplate
-
Create .env
file in reference to .env.sample
-
Run containers
// Listening on localhost:1323 with hot reloading(localhost:5002)
docker-compose up -d
Running the tests
make test
with coverage
make cover
API Docs
- Run dev server
- Open
localhost:1323/swagger/index.html
Migration
Deployment(WIP)