2016-10-20 20:30:53 +02: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 22:37:04 +02:00
|
|
|
e.Use(middleware.Static("public"))
|
2016-10-20 20:30:53 +02:00
|
|
|
|
|
|
|
return e
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2016-10-21 01:57:31 +02:00
|
|
|
if err := e.Start(":8080"); err != nil {
|
2016-10-23 22:37:04 +02:00
|
|
|
e.Logger.Fatal(err)
|
2016-10-21 01:57:31 +02:00
|
|
|
}
|
2016-10-20 20:30:53 +02:00
|
|
|
}
|