Closed Codycody31 closed 1 month ago
If this is based on the suggestion by @pH_low, then I might've understood it in a different way. I got the idea that he was asking for a proxy to route all API requests to a non-local server, so that he doesn't have to setup Discuit in full on his local machine to work on just the front-end.
I believe what @pH_low needed could be solved another way but similarly, where a proxy has the UI served while also proxying /api and /images to the development server running elsewhere. But this is primarily to make it easier to work on the UI, as at least when I have to do it, I make my relevant changes, then re-build the UI, as don't believe on the UI I am able to change to URL it goes to for the API. So with this, I can now proxy the UI to run on the same local port as the API so it can talk to it correctly
Understood. Could you rename DevProxy
in config.Config
into something like UIProxy
or StaticProxy
so that it's clear that the proxy is for the UI?
Renamed it from DevProxy
to UIProxy
npm start
failing due tocontentBase: './dist'
inwebpack.dev.js
devProxy
in config UI dev serverIt should make it way easier to work on UI changes rather than having to
npm run build:local
on every update.