@@ -8,6 +8,8 @@
88{-# LANGUAGE TemplateHaskell #-}
99module Obelisk.Backend
1010 ( Backend (..)
11+ , StaticAssets (..)
12+ , serveDefaultObeliskApp'
1113 -- * Re-exports
1214 , Default (def)
1315 , getPageName
@@ -56,7 +58,10 @@ data GhcjsApp route = GhcjsApp
5658-- | Serve a frontend, which must be the same frontend that Obelisk has built and placed in the default location
5759--TODO: The frontend should be provided together with the asset paths so that this isn't so easily breakable; that will probably make this function obsolete
5860serveDefaultObeliskApp :: MonadSnap m => Frontend (R appRoute) -> R (ObeliskRoute appRoute) -> m ()
59−serveDefaultObeliskApp frontend = serveObeliskApp defaultStaticAssets frontendApp
61+serveDefaultObeliskApp = serveDefaultObeliskApp' defaultStaticAssets
62+
63+serveDefaultObeliskApp' :: MonadSnap m => StaticAssets -> Frontend (R appRoute) -> R (ObeliskRoute appRoute) -> m ()
64+serveDefaultObeliskApp' staticAssets frontend = serveObeliskApp staticAssets frontendApp
6065 where frontendApp = GhcjsApp
6166 { _ghcjsApp_compiled = defaultFrontendGhcjsAssets
6267 , _ghcjsApp_value = frontend