Static page routing in Sinatra (Ruby)
Posted
by JP
on Stack Overflow
See other posts from Stack Overflow
or by JP
Published on 2010-04-04T18:08:00Z
Indexed on
2010/04/04
18:13 UTC
Read the original article
Hit count: 196
You can serve static files with Sinatra by placing them in public/ (by default) -- I have an index.html in there at the moment, but how can I make the root point to that file without having to parse it as a template?
To be clear, I can access /index.html successfully, and I'd like to route / to be the same static file, but without redirecting. Any idea how to do this?
© Stack Overflow or respective owner