aboutsummaryrefslogtreecommitdiff
path: root/cmd/web.go
diff options
context:
space:
mode:
authorPeter Smit <peter@smitmail.eu>2015-02-05 12:12:37 +0200
committerPeter Smit <peter@smitmail.eu>2015-02-05 12:17:35 +0200
commit1ab09e4f1b27789121dfba9a6c6e4aa0011ab215 (patch)
tree59ec5e54ed44c41915217522ea37bebf24bd5797 /cmd/web.go
parent02c5bade0fabc24b9b7c05a74c65965e2e53f687 (diff)
Add option to provide configuration file on command line
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 55b6bf08..ceb21344 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -55,6 +55,7 @@ and it takes care of all the other things for you`,
Action: runWeb,
Flags: []cli.Flag{
cli.StringFlag{"port, p", "3000", "Temporary port number to prevent conflict", ""},
+ cli.StringFlag{"config, c", "custom/conf/app.ini", "Configuration file", ""},
},
}
@@ -165,6 +166,9 @@ func newMacaron() *macaron.Macaron {
}
func runWeb(ctx *cli.Context) {
+ if ctx.IsSet("config") {
+ setting.CustomConf = ctx.String("config")
+ }
routers.GlobalInit()
checkVersion()