spring-attic / tut-react-and-spring-data-rest

React.js and Spring Data REST :: A tutorial based on the 5-part blog series by Greg Turnquist
https://spring.io/guides/tutorials/react-and-spring-data-rest
883 stars 1.58k forks source link

Split tut-react-and-spring-data-rest into frontend & backend #108

Closed ccaspanello closed 5 years ago

ccaspanello commented 5 years ago

I really love the guide: tut-react-and-spring-data-rest

However, developing the react app inside the Java project is a little clunky to me. Even though I do npm run-script watch which properly triggers webpack to rebuild the bundle.js; I have to tell IntelliJ to deploy the bundle.js to the classloader so Spring Boot devtools picks it up.

I think a better development experience would be to have separate projects for frontend (npm start) and backend (spring-boot:run or IntelliJ debug).

Of course this does have some issues with CORS . . . which I am having a hard time fighting through now. Maybe one you you awesome developers more knowledgeable could help me out a bit.

gregturn commented 5 years ago

For the record, any combination of JS + Java can get funky, because teams set things up in many different ways.

I don't really have the bandwidth to fully break this up this into two apps like that. Since my real focus is trying to illustrate hypermedia and RESTful concepts (not pretty URLs) using two of the most popular toolkits, I think the structure we presently have is fine.

Thanks for taking a deeper look at things.