Start fleshing out web server

This commit is contained in:
Justin Hawkins
2017-07-27 12:18:02 +09:30
parent 80a905b7d6
commit f976777f40
2 changed files with 58 additions and 14 deletions

11
dau.go
View File

@@ -46,7 +46,8 @@ func main() {
config := parseOptions()
checkPath(config.path)
web.Init()
wconfig := web.Init()
go processWebChanges(wconfig)
checkUpdates()
@@ -63,6 +64,14 @@ func main() {
}
}
func processWebChanges(wc web.DAUWebServer) {
for {
change := <-wc.ConfigChange
log.Print(change)
log.Print("Got a change!")
}
}
func checkPath(path string) {
src, err := os.Stat(path)
if err != nil {