diff --git a/bee.json b/bee.json index 12b95d8..7422de8 100644 --- a/bee.json +++ b/bee.json @@ -11,6 +11,8 @@ "models": "", "others": [] }, + "cmd_args": [], + "envs": [], "bale": { "import": "github.com/beego/beeweb/bale", "dirs": [ diff --git a/conf.go b/conf.go index c49f5b0..77e242f 100644 --- a/conf.go +++ b/conf.go @@ -50,8 +50,9 @@ var conf struct { Models string Others []string // Other directories. } `json:"dir_structure"` - - Bale struct { + CmdArgs []string `json:"cmd_args"` + Envs []string + Bale struct { Import string Dirs []string IngExt []string `json:"ignore_ext"` diff --git a/watch.go b/watch.go index ffa5657..02026ef 100644 --- a/watch.go +++ b/watch.go @@ -179,6 +179,8 @@ func Start(appname string) { cmd = exec.Command(appname) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr + cmd.Args = conf.CmdArgs + cmd.Env = conf.Envs go cmd.Run() ColorLog("[INFO] %s is running...\n", appname)