-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathserver.go
More file actions
34 lines (26 loc) · 692 Bytes
/
server.go
File metadata and controls
34 lines (26 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"github.com/labstack/echo"
"github.com/labstack/gommon/log"
//"github.com/labstack/echo/middleware"
"github.com/mrlsd/echo-cms/config"
"github.com/mrlsd/echo-cms/libs"
"github.com/mrlsd/echo-cms/modules/backend"
)
func main() {
config.LoadConfig()
e := echo.New()
// Routers
backend.UrlRules(e)
e.Static("/assets", "static")
e.Debug = true
e.Logger.SetLevel(log.DEBUG)
e.HTTPErrorHandler = libs.CustomHTTPErrorHandler
//e.Pre(middleware.NonWWWRedirect())
//e.Use(middleware.Secure())
//e.Use(middleware.CSRF())
//e.Use(middleware.Logger())
//e.Use(middleware.Recover())
//e.Use(middleware.BodyLimit("2M"))
e.Logger.Fatal(e.Start(":3000"))
}