Golang Simple Project
install golang in go bro
docker run --name docker-postgres -e POSTGRES_PASSWORD=password -d resistan
docker run -d --name elasticsearch --net somenetwork -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:tag
insert in your ~/.bashrc or ~/.bash_profile
export GOROOT=/usr/local/go #this path of your go lang install
export GOPATH=$HOME/golang-project #this is path for your package and project init
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
run you run the project you must install depedency
or install
go get github.com/astaxie/beego
go get -u github.com/beego/bee
bee migrate -driver="postgres" -conn="postgres://postgres:[email protected]:5432/resistan" -dir="database/migrations"
dep ensure
config/app.conf
appname = resistor
httpport = 8081
runmode = dev
autorender = false
copyrequestbody = true
EnableDocs = true
sqlconn =
psqluser=postgres
psqlport=5432
psqldb=resistan
psqlurls=localhost
psqlpass=postgres
elasticsearch_url=http://localhost:9200/elasticsearch # your elastic url
run the project
bee run