refactor static route definition -- android webapp build fix

Incidentially should work around the last problem that prevented the webapp
building on Android. (Except for a few places I need to clean up after
hand-fixing the spliced TH code.)
This commit is contained in:
Joey Hess 2013-04-17 01:37:08 -04:00
parent 82dfd632af
commit 824c95376a
2 changed files with 4 additions and 1 deletions

View file

@ -58,7 +58,7 @@ webAppThread assistantdata urlrenderer noannex listenhost postfirstrun onstartup
<$> pure assistantdata
<*> (pack <$> genRandomToken)
<*> getreldir
<*> pure $(embed "static")
<*> pure staticRoutes
<*> pure postfirstrun
<*> pure noannex
<*> pure listenhost

View file

@ -30,6 +30,9 @@ import Network.Socket (HostName)
publicFiles "static"
staticRoutes :: Static
staticRoutes = $(embed "static")
mkYesodData "WebApp" $(parseRoutesFile "Assistant/WebApp/routes")
data WebApp = WebApp