Often, my index file is inside a folder. Then I have to create an index.html at the top level which simply redirects to the index file in the subfolder.
An entry in a file would be helpful, the file could be something like .htaccess.
Just run serve ./subfolder.
Thanks, but that does not fit to my situation. I let serve serve a given folder, in a subfolder is the index.html which itself references files from sibling directories. So, I have to serve the parent folder of the folder containing the index.html so that it's possible to reference files from sibling folders of the folder containing the index.html.
Why don't you put the index file at the root level in the first place? URL redirecting is often caused by non-idiomatic directory structures?
May be you're right !?
Artifacts in the different sibling folders come from different projects. The project which brings the index.html, is the master project which (optionally) depends on the other projects. That means I have a folder which contains an 矛ndex.html and sibling folders which also have to be served.
Well, that's it.
[IMHO] I'm not sure introducing some URL rewriting mechanism (with all it's bugs & complexity) is appropriate to solve this rather technical problem.
@k7sleeper symlinking might also be an option for you.
OK, I understand. I'll think of symlinking.
Thanks for answering!
@leo what about a simple caching use case. Or rather, to able to configure caching more than just the --cache flag.
I'm only thinking of this because of https://github.com/zeit/now-cli/issues/1042 and perhaps .htaccess is too much for this library, but implementing more intricate cache control can be useful? Thoughts?