main.go (356B)
1 package main 2 3 import ( 4 "fmt" 5 "log" 6 "net/http" 7 8 "git.hanabi.in/dev/am-i-alive/config" 9 "git.hanabi.in/dev/am-i-alive/handlers" 10 ) 11 12 func main() { 13 http.HandleFunc("/", handlers.GetHomePage) 14 http.HandleFunc("/update", handlers.UpdateLastActive) 15 fmt.Printf("Starting server on port %s.\n", config.Port) 16 log.Fatal(http.ListenAndServe(config.Port, nil)) 17 }