mirror of
https://github.com/labstack/echo.git
synced 2024-12-22 20:06:21 +02:00
093e5c9ed6
Signed-off-by: Vishal Rana <vr@labstack.com>
27 lines
384 B
Go
27 lines
384 B
Go
// +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())
|
|
|
|
e.Use(middleware.Static("public"))
|
|
|
|
return e
|
|
}
|
|
|
|
func main() {
|
|
if err := e.Start(":8080"); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|