SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
714 stars 109 forks source link

Redirect everything to index.html #211

Closed JoleMile closed 4 years ago

JoleMile commented 4 years ago

Is there a simple way to return index.html file stored in the static folder for every request made? It shouldn't behave as redirectTo false "/" since this redirect changes the uri. It should preserve the current url and always return the index.html file.

I am trying to serve a single page application written in react.

JoleMile commented 4 years ago

Doing this in browserRouter worked: forward "" (htmlFile "static/Index.html")

Please comment if this is not the correct way of doing it. I'll close the issue, for now, thank you.