1
0
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:
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": "", "models": "",
"others": [] "others": []
}, },
"cmd_args": [],
"envs": [],
"bale": { "bale": {
"import": "github.com/beego/beeweb/bale", "import": "github.com/beego/beeweb/bale",
"dirs": [ "dirs": [

View File

@ -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"`

View File

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