Just noticed the FileMod docs say:
RouteMod { routes = [ "favicon.ico": `pub/icon.png`, "stuff": `pub/` ] }
Since routes is of type Str:WebMod, actually running this code leads to:
routes
Str:WebMod
java.lang.ClassCastException: fan.sys.Uri cannot be cast to fan.web.WebMod
I believe the most concise way to do this correctly is:
RouteMod { routes = [ "favicon.ico": FileMod { file = `pub/icon.png`.toFile }, "stuff": FileMod { file = `pub/`.toFile } ] }
Yep thanks @rfeldman - pushed a fix, and updated online docs too.
Login or Signup to reply.
rfeldman Mon 22 Nov 2010
Just noticed the FileMod docs say:
Since
routes
is of typeStr:WebMod
, actually running this code leads to:I believe the most concise way to do this correctly is:
andy Wed 24 Nov 2010
Yep thanks @rfeldman - pushed a fix, and updated online docs too.