mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +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": [
|
||||||
|
5
conf.go
5
conf.go
@ -50,8 +50,9 @@ 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"`
|
||||||
Bale struct {
|
Envs []string
|
||||||
|
Bale struct {
|
||||||
Import string
|
Import string
|
||||||
Dirs []string
|
Dirs []string
|
||||||
IngExt []string `json:"ignore_ext"`
|
IngExt []string `json:"ignore_ext"`
|
||||||
|
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