Skip to content

Golang, Revel, Gorp, Mysql, Docker, Revel Validation, Simple RestApi, Golang best practics

Notifications You must be signed in to change notification settings

abinhho/revel-golang-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clone this repo

$ cd $GOPATH/src
$ git clone <this repo>

1. Work with non docker

Get some go module

$ go get github.com/revel/revel
$ go get github.com/revel/cmd/revel
$ go get github.com/go-gorp/gorp

// Config file
$ cp conf/app.conf.dev conf/app.conf
// Then open app.conf and edit sql config

Install mysql

// Do by yourself

Run this app

$ revel run revel-golang-app dev

2. Play with docker and mysql

Run app

$ docker-compose up --build --force-recreate

View Docker status

$ docker container ls -a

SSH to docker

$ docker exec -it revel-golang-app /bin/bash
// Or ssh to mysql service inside docker
$ docker exec -it mysql-db /bin/bash
POST: http://localhost:9000/api/book -> Use PostMan to insert recore into DB

About

Golang, Revel, Gorp, Mysql, Docker, Revel Validation, Simple RestApi, Golang best practics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published