Start fleshing out web server
This commit is contained in:
11
dau.go
11
dau.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user