2019-11-06 12:33:46 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
var (
|
2019-12-21 10:26:14 +00:00
|
|
|
v = settings()
|
|
|
|
l = newLogger(v)
|
|
|
|
g = newGracefulContext(l)
|
2020-02-28 17:07:50 +00:00
|
|
|
|
2020-03-31 08:37:10 +00:00
|
|
|
a = newApp(
|
|
|
|
WithLogger(l),
|
|
|
|
WithConfig(v))
|
|
|
|
)
|
2019-11-06 12:33:46 +00:00
|
|
|
|
2020-03-31 08:37:10 +00:00
|
|
|
go a.Serve(g)
|
|
|
|
go a.Worker(g)
|
2019-12-21 10:26:14 +00:00
|
|
|
|
2020-03-31 08:37:10 +00:00
|
|
|
a.Wait()
|
2019-11-06 12:33:46 +00:00
|
|
|
}
|