예제 #1
0
파일: errors.go 프로젝트: hraban/web
func main() {
	web.Get("/", root)
	web.Get("/404", notfound)
	web.Get("/teapot", teapot)
	web.Get("/generic", generic)
	web.Run("0.0.0.0:8081")
}
예제 #2
0
func main() {
	web.Get("/", root)
	web.Get("/a", a)
	web.Get("/b", b)
	web.Get("/c", c)
	web.Get("/d", d)
	web.Get("/e", e)
	web.Get("/f", myhandlertype("return io.Reader"))
	web.Get("/g", g)
	web.Get("/h", h)
	web.Get("/i", i)
	web.Get("/j", j)
	web.Run("127.0.0.1:9999")
}
예제 #3
0
파일: params.go 프로젝트: hraban/web
func main() {
	web.Get("/", root)
	web.Post("/process", process)
	web.Run("127.0.0.1:9999")
}
예제 #4
0
파일: securecookie.go 프로젝트: hraban/web
func main() {
	web.Config.CookieSecret = "7C19QRmwf3mHZ9CPAaPQ0hsWeufKd"
	web.Get("/", root)
	web.Post("/say", say)
	web.Run("127.0.0.1:9999")
}
예제 #5
0
파일: compress.go 프로젝트: hraban/web
func main() {
	web.AddWrapper(web.CompressWrapper)
	web.Get("/", root)
	web.Run("127.0.0.1:9999")
}
예제 #6
0
파일: wrapper.go 프로젝트: hraban/web
func main() {
	// Add AuthHandler to our PreModule list
	web.AddPreModule(AuthHandler)
	web.Get("/(.*)", Hello)
	web.Run("0.0.0.0:9999")
}
예제 #7
0
파일: multipart.go 프로젝트: hraban/web
func main() {
	web.Get("/", index)
	web.Post("/multipart", multipart)
	web.Run("0.0.0.0:9999")
}
예제 #8
0
파일: hello.go 프로젝트: hraban/web
func main() {
	web.Get("/(.*)", hello)
	web.Run("127.0.0.1:9999")
}
예제 #9
0
파일: websocket.go 프로젝트: hraban/web
func main() {
	web.Websocket("/(.*)", root)
	web.Run("0.0.0.0:8081")
}