cookie-curler/main.go

33 lines
489 B
Go

package main
import (
"log"
"net/http"
"time"
)
type State struct {
Cookies float64
}
func clickHandler
func main() {
http.HandleFunc("/click", clickHandler)
http.Handle("/", http.FileServer(http.Dir("static/")))
foraByName = map[string]*Forum{}
f := newForum("")
f.Log = []Message{
{
When: time.Now().Unix(),
Who: "(system)",
Text: "Welcome to μChat",
},
}
bind := ":8080"
log.Printf("Listening on %s", bind)
log.Fatal(http.ListenAndServe(bind, nil))
}