Failed to load resource: the server responded with a status of 500 (Internal Server Error) while using react
frontend is running on port:3000
and backend was running on port:4000
. so I made the function, but still, my components are not visible.
I created a file setupProxy.js
const {createProxyMiddleware} = require('http-proxy-middleware');
module.exports = function (app) {
app.use(
'/api',
createProxyMiddleware({
target: 'https://192.168.0.156:4000',
changeOrigin: true,
}),
);
};
Via Active questions tagged javascript - Stack Overflow https://ift.tt/LBerM3a
Comments
Post a Comment