diff options
Diffstat (limited to 'cmd/atb/main.go')
-rw-r--r-- | cmd/atb/main.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/cmd/atb/main.go b/cmd/atb/main.go index 7b7e131..6335c1f 100644 --- a/cmd/atb/main.go +++ b/cmd/atb/main.go @@ -5,7 +5,6 @@ import ( "log" "time" - "github.com/mpolden/atb/atb" "github.com/mpolden/atb/entur" "github.com/mpolden/atb/http" ) @@ -25,18 +24,13 @@ func mustParseDuration(s string) time.Duration { func main() { listen := flag.String("l", ":8080", "Listen address") - config := flag.String("c", "config.json", "Path to config file") stopTTL := flag.String("s", "168h", "Bus stop cache duration") departureTTL := flag.String("d", "1m", "Departure cache duration") cors := flag.Bool("x", false, "Allow requests from other domains") flag.Parse() - atb, err := atb.NewFromConfig(*config) - if err != nil { - log.Fatal(err) - } entur := entur.New("") - server := http.New(atb, entur, mustParseDuration(*stopTTL), mustParseDuration(*departureTTL), *cors) + server := http.New(entur, mustParseDuration(*stopTTL), mustParseDuration(*departureTTL), *cors) log.Printf("Listening on %s", *listen) if err := server.ListenAndServe(*listen); err != nil { |