Remove from frontend the settings distribution role

This commit is contained in:
nemunaire 2022-06-08 02:51:17 +02:00
parent af6e86d4ef
commit cfde1689cc
7 changed files with 28 additions and 37 deletions

View file

@ -20,8 +20,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(&settings.SettingsDir, "settings", settings.SettingsDir, "Base directory where read settings")
flag.StringVar(&SettingsDistDir, "settingsDist", SettingsDistDir, "Directory where place settings to distribute")
flag.StringVar(&settings.SettingsDir, "settings", "./SETTINGSDIST", "Base directory where read settings")
flag.StringVar(&startedFile, "startedFile", startedFile, "Path to the file to create/remove whether or not the challenge is running")
flag.StringVar(&SubmissionDir, "submission", "./submissions/", "Base directory where save submissions")
var simulator = flag.String("simulator", "", "Team to simulate (for development only)")
@ -68,7 +67,7 @@ func main() {
http.Handle(fmt.Sprintf("%s/teams.json", *prefix), http.StripPrefix(*prefix, http.FileServer(http.Dir(*teamsDir))))
http.Handle(fmt.Sprintf("%s/themes.json", *prefix), http.StripPrefix(*prefix, http.FileServer(http.Dir(*teamsDir))))
http.Handle(fmt.Sprintf("%s/stats.json", *prefix), http.StripPrefix(*prefix, http.FileServer(http.Dir(*teamsDir))))
http.Handle(fmt.Sprintf("%s/settings.json", *prefix), http.StripPrefix(*prefix, http.FileServer(http.Dir(SettingsDistDir))))
http.Handle(fmt.Sprintf("%s/settings.json", *prefix), http.StripPrefix(*prefix, http.FileServer(http.Dir(settings.SettingsDir))))
// Serve static assets
http.Handle(fmt.Sprintf("%s/css/", *prefix), http.StripPrefix(*prefix, http.FileServer(http.Dir(staticDir))))