func main() { log.SetFlags(log.Lshortfile) // websocket server server := chat.NewServer("/entry") go server.Listen() // static files http.Handle("/", http.FileServer(http.Dir("webroot"))) log.Fatal(http.ListenAndServe(":8080", nil)) }
func main() { s := chat.NewServer() s.Serve("localhost:9988") }