Esempio n. 1
0
File: main.go Progetto: hfeeki/bingo
func main() {
	handler := rest.ResourceHandler{}
	handler.SetRoutes(
		rest.Route{"GET", "/users/:id", GetUser},
	)
	http.ListenAndServe(":8081", &handler)
}
Esempio n. 2
0
func main() {

	handler := rest.ResourceHandler{
		EnableRelaxedContentType: true,
		DisableJsonIndent:        true,
	}

	handler.SetRoutes(
		rest.Route{"GET", "/rest/api/v1/im", callScenario1},
	)
	http.ListenAndServe(":8080", &handler)
}