-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
35 lines (30 loc) · 785 Bytes
/
main.go
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
35
package main
import (
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
"github.com/siredwin/multiurlimports/app1"
"github.com/siredwin/multiurlimports/app2"
"github.com/siredwin/multiurlimports/app3"
)
func main() {
e := echo.New()
e.Debug = true
// Middleware
e.Use(middleware.Logger())
e.Use(middleware.Recover())
e.Use(middleware.Secure())
e.Static("/static", "static")
// Register apps
app1.New(e)
app2.New(e)
app3.New(e)
// #*************** START SERVER *****************# //
e.Logger.Fatal(e.Start(":8000"))
}
//Try these routes:
//http://localhost:8000/app1/view1
//http://localhost:8000/app1/view2
//http://localhost:8000/app2/view3
//http://localhost:8000/app2/view4
//http://localhost:8000/app3/view5
//http://localhost:8000/app3/view6