package main import ( "os" "github.com/rs/zerolog/log" "prayertimes/internal/api" "prayertimes/internal/scrapeutils" "prayertimes/pkg/diyanet" ) func main() { port, ok := os.LookupEnv("PORT") if !ok { port = "8000" } services := newServices() app := api.New(services) err := app.Listen(":" + port) if err != nil { log.Fatal().Err(err).Msg("exit with an error") } } func newServices() api.Services { d := diyanet.Diyanet{ FetcherFunc: scrapeutils.GetParsed, } return api.Services{ PrayerTimesProvider: d, } }