@@ -32,7 +32,7 @@ import Obelisk.Route
32import Obelisk.Route.Frontend
32import Obelisk.Route.Frontend
33import Reflex.Dom
33import Reflex.Dom
34import Snap (MonadSnap, Snap, commandLineConfig, defaultConfig, getsRequest, httpServe, rqPathInfo,
34import Snap (MonadSnap, Snap, commandLineConfig, defaultConfig, getsRequest, httpServe, rqPathInfo,
35− rqQueryString, writeBS)
35+ rqQueryString, writeBS, writeText)
36import Snap.Internal.Http.Server.Config (Config (accessLog, errorLog), ConfigLog (ConfigIoLog))
36import Snap.Internal.Http.Server.Config (Config (accessLog, errorLog), ConfigLog (ConfigIoLog))
37import System.IO (BufferMode (..), hSetBuffering, stderr, stdout)
37import System.IO (BufferMode (..), hSetBuffering, stderr, stdout)
@@ -128,7 +128,10 @@ serveObeliskApp staticAssets frontendApp = \case
128 ObeliskRoute_Resource resComponent :=> Identity resRest -> case resComponent :=> Identity resRest of
128 ObeliskRoute_Resource resComponent :=> Identity resRest -> case resComponent :=> Identity resRest of
129 ResourceRoute_Static :=> Identity pathSegments -> serveStaticAssets staticAssets pathSegments
129 ResourceRoute_Static :=> Identity pathSegments -> serveStaticAssets staticAssets pathSegments
130 ResourceRoute_Ghcjs :=> Identity pathSegments -> serveGhcjsApp frontendApp $ GhcjsAppRoute_Resource :/ pathSegments
130 ResourceRoute_Ghcjs :=> Identity pathSegments -> serveGhcjsApp frontendApp $ GhcjsAppRoute_Resource :/ pathSegments
131− ResourceRoute_JSaddleWarp :=> Identity _ -> error "asdf" --TODO
131+ ResourceRoute_JSaddleWarp :=> Identity _ -> do
132+ let msg = "Error: Obelisk.Backend received jsaddle request"
133+ liftIO $ putStrLn $ T.unpack msg
133serveStaticAssets :: MonadSnap m => StaticAssets -> [Text] -> m ()
136serveStaticAssets :: MonadSnap m => StaticAssets -> [Text] -> m ()
134serveStaticAssets assets pathSegments = serveAsset (_staticAssets_processed assets) (_staticAssets_unprocessed assets) $ T.unpack $ T.intercalate "/" pathSegments
137serveStaticAssets assets pathSegments = serveAsset (_staticAssets_processed assets) (_staticAssets_unprocessed assets) $ T.unpack $ T.intercalate "/" pathSegments