Exemple #1
0
func main() {
	uweb.Config.Debug = true
	uweb.Get("^$", index)
	uweb.Post("^save/$", save)
	if err := uweb.Run("localhost:6062"); err != nil {
		panic(err)
	}
}
Exemple #2
0
func ExampleMount() {
	app := uweb.NewApp()

	app.Get("^bar/(.*)", func(name string) string {
		return "Hello, " + name
	})

	uweb.Mount("^foo/", app)

	uweb.Run("localhost:6060")
}