Exemple #1
0
func main() {
	web.Get("/", root)
	web.Get("/404", notfound)
	web.Get("/teapot", teapot)
	web.Get("/generic", generic)
	web.Run("0.0.0.0:8081")
}
Exemple #2
0
func main() {
	web.Get("/", root)
	web.Post("/process", process)
	web.Run("127.0.0.1:9999")
}
Exemple #3
0
func main() {
	web.Config.CookieSecret = "7C19QRmwf3mHZ9CPAaPQ0hsWeufKd"
	web.Get("/", root)
	web.Post("/say", say)
	web.Run("127.0.0.1:9999")
}
Exemple #4
0
func main() {
	web.AddWrapper(web.CompressWrapper)
	web.Get("/", root)
	web.Run("127.0.0.1:9999")
}
Exemple #5
0
func main() {
	web.Get("/(.*)", hello)
	// You can create an example cert using generate_cert.go include in pkg crypto/tls
	web.RunTLS(":9999", "/tmp/cert.pem", "/tmp/key.pem")
}
Exemple #6
0
func main() {
	// Add AuthHandler to our PreModule list
	web.AddPreModule(AuthHandler)
	web.Get("/(.*)", Hello)
	web.Run("0.0.0.0:9999")
}
Exemple #7
0
func main() {
	web.Get("/", index)
	web.Post("/multipart", multipart)
	web.Run("0.0.0.0:9999")
}
Exemple #8
0
func main() {
	web.Get("/(.*)", hello)
	web.Run("127.0.0.1:9999")
}
Exemple #9
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")
}