summaryrefslogtreecommitdiff
path: root/src/main.go
blob: fdcfef85801b7e8dd44c92c83df7d7c4ede69ba9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package main

import (
	"log/slog"
	"net/http"

	index "physick.ru/Index"
	render "physick.ru/Render"
	settings "physick.ru/Settings"
)

func main() {
	settings.ReadSettings()
	index.EstablistDBConnection()

	render.RegisterEndpoints()

	var httpErr = http.ListenAndServe(settings.Current.Port, nil)
	if httpErr != nil {
		slog.Error("Server error", slog.Any("Message", httpErr))
	}
}