1
0
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:
Unknown 2013-11-26 23:59:07 -05:00
parent 3674476b3d
commit 5118cd348d
3 changed files with 7 additions and 2 deletions

View File

@ -11,6 +11,8 @@
"models": "",
"others": []
},
"cmd_args": [],
"envs": [],
"bale": {
"import": "github.com/beego/beeweb/bale",
"dirs": [

View File

@ -50,7 +50,8 @@ var conf struct {
Models string
Others []string // Other directories.
} `json:"dir_structure"`
CmdArgs []string `json:"cmd_args"`
Envs []string
Bale struct {
Import string
Dirs []string

View File

@ -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)