aboutsummaryrefslogtreecommitdiff
path: root/src/main.go
blob: d3f6c03765d73d6bf7832067ed6dcab5ae6d93ad (plain)
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
package main

import (
	"gitlab.com/alexkavon/newsstand/src/auth"
	"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() {
	// load config
	config := conf.NewConf()
	// connect database
	// start server
	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()
}