go-rest-boilerplate-echo

command module
v0.0.0-...-e8a3033 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 26 Imported by: 0

README

Go REST API Boilerplate

  • github.com/labstack/echo
  • github.com/jinzhu/gorm
  • github.com/casbin/casbin/v2
  • github.com/spf13/viper
  • github.com/swaggo/swag

Requirements

Go
brew install goenv
goenv install 1.16.x
goenv global 1.16.x
goenv rehash

Install project go modules

make dep

Database (Postgres) Config

before start: cp config.yaml.example config.yaml

... and update your database config

app: local
port: :8080

database:
  name: <database name>
  name: <user name>
  password: <user passWord>

Gorm Database Migration

$ go run ./migrate/migrate.go

Launch the server

$ make start-services  // Setup local database with docker compose
$ make serve

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL