2016-10-20 11:30:53 -07:00
|
|
|
// +build !appengine,!appenginevm
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/labstack/echo"
|
|
|
|
"github.com/labstack/echo/middleware"
|
|
|
|
)
|
|
|
|
|
|
|
|
func createMux() *echo.Echo {
|
|
|
|
e := echo.New()
|
|
|
|
|
|
|
|
e.Use(middleware.Recover())
|
|
|
|
e.Use(middleware.Logger())
|
|
|
|
e.Use(middleware.Gzip())
|
|
|
|
|
2016-10-23 13:37:04 -07:00
|
|
|
e.Use(middleware.Static("public"))
|
2016-10-20 11:30:53 -07:00
|
|
|
|
|
|
|
return e
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2016-10-20 16:57:31 -07:00
|
|
|
if err := e.Start(":8080"); err != nil {
|
2016-10-23 13:37:04 -07:00
|
|
|
e.Logger.Fatal(err)
|
2016-10-20 16:57:31 -07:00
|
|
|
}
|
2016-10-20 11:30:53 -07:00
|
|
|
}
|