Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tkc/go-echo-server-sandbox

Repository files navigation

Go

go-echo-server-sandbox

echo server sandbox using ORM mapper and html template.

  • github.com/labstack/echo
  • github.com/jinzhu/gorm
  • github.com/pilu/fresh
  • github actions

Requirements

Go

$ brew install goenv
$ goenv install 1.13.x
$ goenv global 1.13.x
$ goenv rehash

Dependency

$ make dep

Install golangci-lint

$ brew install golangci/tap/golangci-lint
$ brew upgrade golangci/tap/golangci-lint

more...

Lint

$ golangci-lint run 

Database (MySQL) Config

note: cp config.yaml.example config.yaml

update database config

app: local
port: :8080
database:
 name: <database name>
 name: <user name>
 password: <user passWord>

Migration

$ go run ./migrate/migrate.go

Serve and Hot Reload

$ fresh

Create New User

$ curl http://localhost:8080/user \
 -X POST \
 -H "Content-Type: application/json" \
 -d '{"Name": "userName","Age": 1}'

Testing

$ go test ./...

About

A scaffold of golang web server using labstack/echo

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /