//### 1. delete proxy from package.json ###
//### 2. install http proxy middleware ###
npm install http-proxy-middleware --save.
//### 3. Create a file setupProxy.js inside your src folder or the root of your folder.###
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:6000', // replace 6000 with your required port
changeOrigin: true,
})
);
};
npm install http-proxy-middleware --save