Example #1
0
func route(m *web.Mux) {

	resultMux := web.New()
	resultMux.Get("/face_detect/:name", http.StripPrefix("/face_detect/", http.FileServer(http.Dir("./results/"))))
	resultMux.Use(renameID)

	m.Handle("/face_detect/:name", resultMux)
	m.Get(toolURI, controllers.ControllPannel)
	m.Post(toolURI, controllers.RegisterFace)
}
Example #2
0
func Add(mux *web.Mux) {

	/* Endpoint to handler config */
	mux.Get("/", home)
	mux.Get("/projects", projects)
	mux.Get("/projects/structures", structures)
	mux.Get("/projects/structures/info", structures)
	mux.Handle("/projects/p2drive/*", param2drive.AddRoutes("/projects/p2drive"))
	mux.Get("/contact", contact)
	mux.Get("/site-map", siteMap)
	mux.Get("/faq", faq)

}