Move settings and started file into SETTINGS directory
This commit is contained in:
parent
0d7d49e033
commit
f1d6b92267
7 changed files with 22 additions and 10 deletions
|
@ -16,6 +16,7 @@ func main() {
|
|||
var bind = flag.String("bind", "127.0.0.1:8080", "Bind port/socket")
|
||||
var prefix = flag.String("prefix", "", "Request path prefix to strip (from proxy)")
|
||||
var teamsDir = flag.String("teams", "./TEAMS/", "Base directory where find existing teams")
|
||||
flag.StringVar(&SettingsDir, "settings", "./SETTINGS/", "Base directory where load and save settings")
|
||||
flag.StringVar(&SubmissionDir, "submission", "./submissions/", "Base directory where save submissions")
|
||||
flag.Parse()
|
||||
|
||||
|
@ -32,7 +33,7 @@ func main() {
|
|||
}
|
||||
|
||||
// Load configuration
|
||||
settings.LoadAndWatchSettings(path.Join(*teamsDir, settings.SettingsFile), reloadSettings)
|
||||
settings.LoadAndWatchSettings(path.Join(SettingsDir, settings.SettingsFile), reloadSettings)
|
||||
|
||||
// Register handlers
|
||||
http.Handle(fmt.Sprintf("%s/chname/", *prefix), http.StripPrefix(fmt.Sprintf("%s/chname/", *prefix), submissionTeamChecker{"name change", ChNameHandler, *teamsDir}))
|
||||
|
|
Reference in a new issue