I'm using the wai-app-static static package to serve a small website. Originally I called it as:
staticApp defaultFileServerSettings root
and all was right with the world. I wanted to switch to using defaultWebAppSettings, though, (as this is a website). I was able to get that to work, such that if I went to http://localhost:3000/index.html
, it was fine, but I also need to set up a redirect from the root folder to the index site (viz. http://localhost:3000 --> http://localhost:3000/index.html
).
Based on what I saw in the code, I tried a couple of variations of:
(defaultWebAppSettings root) { ssIndices = map unsafeToPiece ["index.html"],
ssRedirectToIndex = True }
I'm able to compile and run the server, but I can't get the redirection to work.
Any pointers or ideas would be greatly appreciated!
Thanks