示例#1
0
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()
}
示例#2
0
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)
	}
}
示例#3
0
func main() {
	app := gopherjs.App{PackageName: "github.com/kirillrdy/gopherjs/examples/hello_world"}
	app.Mount("/")

	nadeshiko.StartServer()
}