func main() { app := gopherjs.App{PackageName: "github.com/kirillrdy/libkanji/web/client"} http.HandleFunc("/edict", func(response http.ResponseWriter, request *http.Request) { http.ServeFile(response, request, libkanji.Edict2FilePath()) }) app.Mount("/") nadeshiko.StartServer() }
func main() { app := gopherjs.App{PackageName: "github.com/kirillrdy/gopherjs/examples"} app.Mount("/") address := ":3000" log.Printf("Starting server on %s", address) err := http.ListenAndServe(address, nil) if err != nil { log.Panic(err) } }
func main() { app := gopherjs.App{PackageName: "github.com/kirillrdy/gopherjs/examples/hello_world"} app.Mount("/") nadeshiko.StartServer() }