3 ms·
Just use http-proxy to set up a local domain so you can access your dev environment at frontend.yoursite.local (proxied to localhost:3000) and the api at api.yo
by eurasiantiger 5y ago
Just use http-proxy to set up a local domain so you can access your dev environment at frontend.yoursite.local (proxied to localhost:3000) and the api at api.yoursite.local (proxied to whatever 3rd party api). Boom, problem solved. You can even rewrite headers and content of the requests in and out.
- jnovacho 5y agoDo you have any recomendations, which proxy to use? Specifically on Win.
- eurasiantiger 5y agohttps://www.npmjs.com/package/http-proxy https://www.npmjs.com/package/http-proxy Integrates nicely with existing JS frontend tooling.