girl is a sinatra style web framework
Make sure you have the a working Go environment. See the install instructions.
To install girl, simply run:
go get github.com/cgyy/girl
package main
import (
"github.com/cgyy/girl"
)
func Index(c *girl.Context) girl.View {
return c.RenderText("hello world")
}
func main() {
app := girl.New()
app.Get("/", Index)
app.Run(":9999")
}
To run the application, put the code in a file called hello.go and run:
go run hello.go