-- This function allocates resources (such as a database connection pool),
-- performs initialization and creates a WAI application. This is also the
-- place to put your migrate statements to have automatic database
-- migrations handled by Yesod.
withWiki :: Text -> (Application -> IO a) -> IO a
withWiki approot' f = Settings.withConnectionPool $ \p -> do
    runConnectionPool (runMigration migrateAll) p
    s <- static Settings.staticdir
    let h = Wiki s p approot'
    toWaiApp h >>= f
withWiki :: Text -> (Application -> IO a) -> IO a
withWiki approot' f = Settings.withConnectionPool $ \p -> do
    runConnectionPool (runMigration migrateAll) p
    s <- static Settings.staticdir
    let h = Wiki s p approot'
    toWaiApp h >>= f
withWiki approot' f = Settings.withConnectionPool $ \p -> do
    runConnectionPool (runMigration migrateAll) p
    s <- static Settings.staticdir
    let h = Wiki s p approot'
    toWaiApp h >>= f