diff options
Diffstat (limited to 'src/main.go')
| -rw-r--r-- | src/main.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main.go b/src/main.go index fe6a51a..d3f6c03 100644 --- a/src/main.go +++ b/src/main.go @@ -5,6 +5,7 @@ import ( "gitlab.com/alexkavon/newsstand/src/conf" "gitlab.com/alexkavon/newsstand/src/db" "gitlab.com/alexkavon/newsstand/src/server" + "gitlab.com/alexkavon/newsstand/src/user" ) func main() { @@ -12,10 +13,14 @@ func main() { config := conf.NewConf() // connect database // start server - s := server.NewServer(config, server.NewRouter(config), db.NewDb(config)) - for _, route := range auth.Routes { - s.Router. - Method(route.Method, route.Pattern, route.HandlerFunc(s)) + s := server.NewServer(config, db.NewDb(config)) + s.BuildUi() + routers := []server.Routes{ + auth.Routes, + user.Routes, + } + for _, r := range routers { + s.RegisterRoutes(r) } s.Serve() } |
