Beego based RestFul API service
which supports mobile app as cloud service
- RestFul API
- Access Token, User Auth
- github.com/astaxie/beego
- github.com/astaxie/beego/context
- github.com/astaxie/beego/orm
- github.com/dgrijalva/jwt-go
- github.com/go-sql-driver/mysql
- 安装 bee 工具
- go get github.com/rubinliudongpo/airad (注意配置GOROOT,GOPATH,详情请参考 http://sourabhbajaj.com/mac-setup/Go/README.html )
- 在mysql数据库里创建数据库名字叫airad
mysql -uroot -pYOURROOTPASSWORD -h 127.0.0.1 -e "CREATE DATABASE IF NOT EXISTS airad DEFAULT CHARSET utf8 COLLATE utf8_general_ci;"
- 创建(并授权给)用户(gouser)和密码(gopassword)
mysql -uroot -pYOURROOTPASSWORD -h 127.0.0.1 -e "grant all privileges on airad.* to gouser@'%' identified by 'gopass';"
- 导入airad.sql
mysql -uroot -pROOTPASSWORD airad < database/airad.sql
请通过 http://localhost:9080/swagger/ 试用API,界面如下
- SWagger的路由页面待更新