diff options
Diffstat (limited to '')
-rw-r--r-- | lib/Server.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Server.hs b/lib/Server.hs index cc86cd2..24f29f9 100644 --- a/lib/Server.hs +++ b/lib/Server.hs @@ -47,6 +47,9 @@ import Persist import Server.ControlRoom import Server.GTFS_RT (gtfsRealtimeServer) import Server.Util (Service, ServiceM, runService) +import Yesod (toWaiAppPlain) + +import System.IO.Unsafe application :: GTFS -> Pool SqlBackend -> IO Application application gtfs dbpool = do @@ -65,7 +68,7 @@ server gtfs@GTFS{..} dbpool = handleDebugAPI :<|> (handleStations :<|> handleTim :<|> handleRegister :<|> handleTripPing :<|> handleWS :<|> handleDebugState :<|> gtfsRealtimeServer gtfs dbpool :<|> adminServer gtfs dbpool) - :<|> controlRoomServer gtfs dbpool + :<|> pure (unsafePerformIO (toWaiAppPlain (ControlRoom "http://localhost:4000/cr" gtfs dbpool))) where handleStations = pure stations handleTimetable station maybeDay = do -- TODO: resolve "overlay" trips (perhaps just additional CalendarDates?) |