mirror of
https://github.com/beego/bee.git
synced 2024-11-22 10:10:53 +00:00
Added args, envs conf option
This commit is contained in:
parent
3674476b3d
commit
5118cd348d
2
bee.json
2
bee.json
@ -11,6 +11,8 @@
|
|||||||
"models": "",
|
"models": "",
|
||||||
"others": []
|
"others": []
|
||||||
},
|
},
|
||||||
|
"cmd_args": [],
|
||||||
|
"envs": [],
|
||||||
"bale": {
|
"bale": {
|
||||||
"import": "github.com/beego/beeweb/bale",
|
"import": "github.com/beego/beeweb/bale",
|
||||||
"dirs": [
|
"dirs": [
|
||||||
|
3
conf.go
3
conf.go
@ -50,7 +50,8 @@ var conf struct {
|
|||||||
Models string
|
Models string
|
||||||
Others []string // Other directories.
|
Others []string // Other directories.
|
||||||
} `json:"dir_structure"`
|
} `json:"dir_structure"`
|
||||||
|
CmdArgs []string `json:"cmd_args"`
|
||||||
|
Envs []string
|
||||||
Bale struct {
|
Bale struct {
|
||||||
Import string
|
Import string
|
||||||
Dirs []string
|
Dirs []string
|
||||||
|
2
watch.go
2
watch.go
@ -179,6 +179,8 @@ func Start(appname string) {
|
|||||||
cmd = exec.Command(appname)
|
cmd = exec.Command(appname)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
|
cmd.Args = conf.CmdArgs
|
||||||
|
cmd.Env = conf.Envs
|
||||||
|
|
||||||
go cmd.Run()
|
go cmd.Run()
|
||||||
ColorLog("[INFO] %s is running...\n", appname)
|
ColorLog("[INFO] %s is running...\n", appname)
|
||||||
|
Loading…
Reference in New Issue
Block a user