DEV Community

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

Collapse
 
pacheco profile image
Thiago Pacheco

Another thing, you should not include the localhost in your axios.get function call.
It should be axios.get("/api/product", ...).

The base URL definition is already set at the beginning of the application when we build the server and define a port, in this case 5000.