Add --fallback-url option to dev server #475
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey! 👋🏼
This PR adds a
--fallback-url=<http://127.0.0.1:3000>
option toelm-pages dev
.For my use-case, this allows proxying to an existing legacy app for unresolved requests (and handling 404s there), rather than hitting the legacy app first and proxying to the dev server.
For some context, I'm using an adapter like this for the build/prod version
where all of my elm-pages routes are behind
/app
(and there are not any/app
routes in the fallback app, OK to use elm-pages 404 page–may make sense to expand this to cover that use case though and forgo elm-pages 404 handling entirely?)Happy to make any changes!