serve static files in Yesod

36 Views Asked by At

I'm using Yesod scaffold to build a website, and hope to serve static files from a separate domain.

I followed the instruction here to add the following code in the instance of Yesod App

urlRenderOverride master (StaticR s) =
    Just $ uncurry (joinPath master "http://static.example.com") $ renderRoute s
urlRenderOverride _ _ = Nothing

But got an error message

‘urlRenderOverride’ is not a (visible) method of class ‘Yesod’

I searched the key word urlRenderOverride in Yesod book, and found it exists in version 1.4, but disappears in the newest version. Anything changed?

0

There are 0 best solutions below