porsager / wright

🚀 Work Fast Work Wright
Do What The F*ck You Want To Public License
178 stars 15 forks source link

how to config proxy to different origin API endpoints #66

Open futurist opened 2 years ago

futurist commented 2 years ago

Seeking to similar way as webpack dev server proxy does below:

module.exports = {
  //...
  devServer: {
    proxy: {
      '/api1': 'http://localhost:3000',
      '/api2': 'http://localhost:4000',
    },
  },
};

But cannot figure out how to do it in wright, can give some hints for this?