echoBoilerplate/server/main.go

22 lines
290 B
Go
Raw Normal View History

2017-10-09 01:33:20 +02:00
package main
import "github.com/labstack/echo"
func main() {
e := echo.New()
t := Template{}
t.Reset()
e.Renderer = &t
e.Static("/static", "static/")
e.GET("/", index)
e.Logger.Fatal(e.Start(":8080"))
}
func index(c echo.Context) error {
return c.Render(200, "index", nil)
}