Answers for "how to use setupproxy in react js"

2

react setupproxy

const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
  app.use(
    '/api',
    createProxyMiddleware({
      target: 'http://localhost:5000',
      changeOrigin: true,
    })
  );
};
Posted by: Guest on February-24-2021

Code answers related to "how to use setupproxy in react js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language