cosmium/main.go
2024-02-14 20:46:40 +02:00

24 lines
455 B
Go

package main
import (
"fmt"
"github.com/pikami/cosmium/api"
"github.com/pikami/cosmium/api/config"
"github.com/pikami/cosmium/internal/repositories"
)
func main() {
config.ParseFlags()
if config.Config.DataFilePath != "" {
repositories.LoadStateFS(config.Config.DataFilePath)
}
router := api.CreateRouter()
router.RunTLS(
fmt.Sprintf(":%d", config.Config.Port),
config.Config.TLS_CertificatePath,
config.Config.TLS_CertificateKey)
}