예제 #1
0
파일: main.go 프로젝트: kirillrdy/libkanji
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()
}