简体   繁体   中英

Could not proxy request /user/register from localhost:3000 to http://localhost:3002/

在此处输入图片说明

在此处输入图片说明 Here back-end project the port is 3002 & front-end port is default 3000 which are different , i added "proxy": "http://localhost:3002" in react project still getting the proxy issue i don't understand the issue here

please help me thanks in advance

Install concurrently by using npm i concurrently

then add below scripts to your backend pakage.json

This will allow you to run your backend and frontend servers at the same time.

    "start": "node server",    
    "client": "npm start --prefix client",
    "dev": "concurrently \"npm run start\" \"npm run client\"",

Then run npm run dev in backend application directory to run the application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM