Exemplo n.º 1
0
func main() {
	fmt.Printf("Loading pages server...\n")
	tmpl.SetModuleName("pages")

	http.HandleFunc("/pages/", Handler)
	http.ListenAndServe(":8150", nil)
}
Exemplo n.º 2
0
func main() {
	fmt.Printf("Loading photos server...\n")
	template.SetModuleName("photos")
	http.HandleFunc("/photos/", Handler)
	http.HandleFunc("/photos/upload", UploaderHandler)
	// TODO: Move these to their own module.
	// We have to get sessions to transfer between processes correctly before we can do that, however.
	http.HandleFunc("/picasa/auth", AuthHandler)
	http.HandleFunc("/picasa/upload", UploadHandler)
	http.ListenAndServe(":8090", nil)
}
Exemplo n.º 3
0
func main() {
	fmt.Printf("Loading events server...\n")
	log.Println("testing!!!!")
	tmpl.SetModuleName("events")
	// Make required data directories
	os.MkdirAll("data/events/event", 0755)
	os.Mkdir("data/events/uploads", 0755)
	os.MkdirAll("data/pages/page/events", 0775)
	os.MkdirAll("data/pages/title/events", 0775)
	// Register handlers.
	http.HandleFunc("/events", MainHandler)
	http.HandleFunc("/events/", EventHandler)
	http.HandleFunc("/events/add", EditHandler)
	http.HandleFunc("/events/edit/", EditHandler)
	// "events/edit" POST goes to SaveHandler
	// 	http.HandleFunc("/events/img/", ImgHandler)

	http.ListenAndServe(":8130", nil)
}
Exemplo n.º 4
0
func main() {
	fmt.Printf("Loading news server...\n")
	template.SetModuleName("news")
	http.HandleFunc("/news/", Handler)
	http.ListenAndServe(":8170", nil)
}