rushlink/cmd/rushlink/main.go

23 lines
347 B
Go
Raw Normal View History

2019-08-25 21:33:56 +02:00
package main
import (
"flag"
"log"
2019-09-15 17:43:09 +02:00
"gitea.hashru.nl/dsprenkels/rushlink/db"
"gitea.hashru.nl/dsprenkels/rushlink/handlers"
"gitea.hashru.nl/dsprenkels/rushlink/metrics"
2019-08-25 21:33:56 +02:00
)
func main() {
flag.Parse()
2019-09-19 21:29:25 +02:00
if err := db.Open(); err != nil {
log.Fatalln(err)
2019-08-25 21:33:56 +02:00
}
2019-09-19 21:29:25 +02:00
defer db.Close()
go metrics.StartMetricsServer()
handlers.StartMainServer()
2019-08-25 21:33:56 +02:00
}