summaryrefslogtreecommitdiff
path: root/main.go
blob: 4efab32789873e586d19ea53209cbd9a23d2d3fc (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

package main

import (
	"log"

	"xengineering.eu/ceres/utils"
	"xengineering.eu/ceres/web"
)

func main() {

	// read all sources of runtime configuration (e.g. CLI flags and config file)
	config := utils.GetRuntimeConfig()

	// print start message
	log.Printf("Starting ceres with config file '%s'\n", config.Path)

	// initialize database
	db := utils.InitDatabase(config.Database)

	// start web server
	web.RunServer(config.Http, &db)
}