Node and React CORS

Hello! I have a node api that is running on localhost:3000 and it serves up my react app from the build folder fine.

However, I want to be able to use reacts development server on :3001 so I get hot refresh but when I try and hit my api from the front end on 3001 I get a CORS error.

I added both 3000 and 3001 to the app. Why is this happening?