echoBoilerplate/server/main.go

21 lines
294 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.GET("/", index)
2017-12-13 06:47:26 +01:00
e.GET("/static/*", getStatic)
2017-10-09 01:33:20 +02:00
e.Logger.Fatal(e.Start(":8080"))
}
func index(c echo.Context) error {
2017-12-13 06:47:26 +01:00
return c.Render(200, "pages/index", nil)
2017-10-09 01:33:20 +02:00
}