Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure rewrite in command line #220

Open
ah1508 opened this issue Aug 31, 2016 · 0 comments
Open

configure rewrite in command line #220

ah1508 opened this issue Aug 31, 2016 · 0 comments

Comments

@ah1508
Copy link

ah1508 commented Aug 31, 2016

Most of SPA which use html5 pushstate need a url rewrite when user directly access to an url which is not a file but a route (ex : refresh on /customers/1) and superstatic is great for that. I guess
{ "rewrites": [ {"source":"/**","destination":"/index.html"} ] } in superstatic.json is very common (index.html or default.html or whatever).

It would be great to have a command line argument for that, something like :
superstatic -ra index.html (ra for "rewrite all").

then the superstatic.json could be removed or used only for advanced configuration. Modern js app already requires many js config (gulp.js, package.js, config.js, etc...) so if the http server could work without another config file for basic settings it would be great.

http-server-fallback use a -f flag (for fallback, but makes a redirect and not a rewrite, which makes it useless for spa)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant