Exemplo n.º 1
0
Arquivo: main.go Projeto: jinzhe/GOSNS
func main() {
	fmt.Println("load func main ")
	http.Handle("/captcha/", captcha.Server(captcha.StdWidth, captcha.StdHeight))
	http.Handle("/static/", http.FileServer(http.Dir(".")))
	http.Handle("/", app.R)
	http.ListenAndServe(":8080", nil)

}
Exemplo n.º 2
0
Arquivo: main.go Projeto: jinzhe/GOSNS
func main() {
	http.HandleFunc("/", showFormHandler)
	http.HandleFunc("/process", processFormHandler)
	http.Handle("/captcha/", captcha.Server(captcha.StdWidth, captcha.StdHeight))
	fmt.Println("Server is at localhost:8666")
	if err := http.ListenAndServe(":8666", nil); err != nil {
		log.Fatal(err)
	}
}