golang-api-vue-js

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

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

Go to latest
Published: Jan 26, 2017 License: MIT Imports: 2 Imported by: 0

README

Golang API and Vue JS

Inside

Installation

  • go get github.com/astaxie/beego
  • go get github.com/beego/bee
  • go get github.com/satori/go.uuid
  • go get github.com/smartystreets/goconvey/convey
  • go get github.com/astaxie/beego/orm
  • go get github.com/go-sql-driver/mysql
  • cp conf/app.conf.dist conf/app.conf

Note: echo "export GOPATH=/var/www/golang" >> ~/.zshrc and echo "export GOROOT=/usr/lib/go" >> ~/.zshrc

Run

  • $GOPATH/bin/bee run
  • Generate docs $GOPATH/bin/bee generate docs, run $GOPATH/bin/bee run -downdoc=true to download swagger.
  • Webpack
    • For runmode = prod generate assets NODE_ENV='production' ./node_modules/.bin/webpack -p
    • For runmode = dev run ./node_modules/.bin/webpack-dev-server --progress --colors --port 8081 --content-base=static/
  • Go to http://localhost:8080, API http://localhost:8080/swagger/
  • Tests go test ./... or go test ./tests

Run Docker (DEV only)

  • docker-compose up run server and generate API docs
  • Webpack
    • For runmode = prod generate assets NODE_ENV='production' ./node_modules/.bin/webpack -p
    • For runmode = dev run ./node_modules/.bin/webpack-dev-server --progress --colors --port 8081 --content-base=static/
  • Uncomment testDB() in controllers/main.go:init() to test the ORM.
  • Go to http://localhost:8080, API http://localhost:8080/swagger/, MySQL UI http://localhost:8090
  • Tests ./bin/go test ./... or ./bin/go test ./tests

Note: ./bin/go - make a container and run the command, ./bin/go env to show containers env variables.

TODO
  • User.
  • Data picker and format data on client.
  • ORM.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
@APIVersion 1.0.0 @Title Test API @Description
@APIVersion 1.0.0 @Title Test API @Description

Jump to

Keyboard shortcuts

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