DEV Community

Discussion on: FullStack setup (Node.js, React.js and MongoDB)

Collapse
 
xporium profile image
xporium

hi,
nice article and i almost followed the steps, but in my sample application I just want notification from node express so for that I used socket.io and socket.io-client so in test application if I set proxy in setupProxy like app.use(proxy('/', { target: 'localhost:5000' })) than its not working, but if i added "proxy": "localhost:5000" in package.json than its working.
i want to set proxy in setupProxy file.

Thanks

Collapse
 
pacheco profile image
Thiago Pacheco

Hi there.

I recommend you to stick with the package.json proxy approach, now that it is supported in the latest version (I don't know exactly since when lol).

I will probably update that in the post as soon as I can.