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.
I'm really please with how this turned out. Now it's working really well.
You can't fake the Kuma (Django)
sessionid
cookies so if you really want to use the realdocker-compose
and MySQL/Django stuff you really do need to setHOST=localhost.org
and use http://localhost.org:3000 but it really works.What's exciting is the ability to fake any JSON response. This can become really powerful because it means you can hack on this like Subscriptions, User Account, etc. all without having to start
docker-compose
or even needing an internet connection. Hopefully, the documentation I wrote is clear enough so I won't repeat how to test this PR.So why
express-http-proxy
and nothttp-proxy-middleware
in CRA's Webpack?Because, this way ALL proxying is always going through to
localhost:5000
and we can have full control over that by writing our own JavaScript code.One great example of this is that now you can use http://localhost:5000/en-US/docs/Web/HTML/Element/canvas/ for example and still get the v1 API working. Yes, it's fake JSON data but at least the header is working when you're testing the built
index.html
pages. I often hop betweenlocalhost:3000
andlocalhost:5000
to try out a page without Toolbar and stuff and it also allows me to test that the way the paths and compressed static assets still work.