1
0
mirror of https://github.com/beego/bee.git synced 2025-07-05 18:20:18 +00:00

bee api create a new api from database

This commit is contained in:
astaxie
2014-08-09 00:55:55 +08:00
parent 41dbb385e7
commit 50dfe40b94
3 changed files with 92 additions and 34 deletions

8
run.go
View File

@ -23,7 +23,7 @@ import (
)
var cmdRun = &Command{
UsageLine: "run [appname] [watchall] [-main=*.go] [-downdoc=true] [-docgen=true]",
UsageLine: "run [appname] [watchall] [-main=*.go] [-downdoc=true] [-gendoc=true]",
Short: "run the app which can hot compile",
Long: `
start the appname throw exec.Command
@ -47,12 +47,12 @@ when the file has changed bee will auto go build and restart the app
var mainFiles ListOpts
var downdoc docValue
var docgen docValue
var gendoc docValue
func init() {
cmdRun.Run = runApp
cmdRun.Flag.Var(&mainFiles, "main", "specify main go files")
cmdRun.Flag.Var(&docgen, "docgen", "auto generate the docs")
cmdRun.Flag.Var(&gendoc, "gendoc", "auto generate the docs")
cmdRun.Flag.Var(&downdoc, "downdoc", "auto download swagger file when not exist")
}
@ -98,7 +98,7 @@ func runApp(cmd *Command, args []string) {
}
}
if docgen == "true" {
if gendoc == "true" {
NewWatcher(paths, files, true)
Autobuild(files, true)
} else {