How can I streamline the workflow of writing a React webapp inside a Spring Boot project?

Right now, I just ran create-react-app inside /src/main, creating /src/main/webapp, and then run npm start in that folder, and gradle runBoot in the root folder.

This leads to several problems – the most difficult of which is that I can’t consume the API in the Spring Boot project due to CSRF protection.

The main problem is that while the create-ract-app server runs at :3000, the Spring Boot app runs at :8080, and while I can of course npm build and use gradle to move the files to the correct location to test if my code works, that workflow is incredibly slow when you need to do it every two minutes. Not to mention that I get a production build of the React app, so I can’t even understand the error messages.

I could probably work around the CSRF problem, but that still isn’t a great solution, and I KNOW that I’m not the first person who’s had this problem, so I am willing to bet good money that one of you geniuses know just what to do 😉