Config location can now be set on start
This commit is contained in:
parent
df4b25de98
commit
fc1c76125f
1 changed files with 7 additions and 1 deletions
8
main.go
8
main.go
|
@ -8,7 +8,13 @@ import (
|
|||
|
||||
func main() {
|
||||
var auth maven.AuthManager
|
||||
config := readconf("config.yaml")
|
||||
var conf string
|
||||
if len(os.Args) > 1 {
|
||||
conf = os.Args[1]
|
||||
} else {
|
||||
conf = "config.yaml"
|
||||
}
|
||||
config := readconf(conf)
|
||||
auth = maven.Create(config.Database)
|
||||
maven.StartServer(config.Server, &auth)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue