github.com/lenfree/buffalo@v0.7.3-0.20170207163156-891616ea4064/examples/simple_hello/main.go (about) 1 package main 2 3 import ( 4 "log" 5 "net/http" 6 7 "github.com/gobuffalo/buffalo" 8 "github.com/gobuffalo/buffalo/render" 9 ) 10 11 func main() { 12 a := buffalo.Automatic(buffalo.NewOptions()) 13 a.GET("/", func(c buffalo.Context) error { 14 return c.Render(200, render.String("Hello, World!")) 15 }) 16 log.Fatal(http.ListenAndServe(":3000", a)) 17 }