In this article, we're going to discuss how to combine Create React App with Spring Boot to give you a single war file, so that we:
- Can have our frontend and backend in a single war file with optimized productions build
- And keep the benefits Create React App gives such as hot reloading
Setup
- Must have Java installed. Head over here to download a version.
- Must have Maven installed. For Mac, I used Homebrew (
brew install maven
), but otherwise, head here. - Must have Node installed. For Mac, I used Homebrew (
brew install node
), but otherwise, head over here.
Note: my IDE of choice is IntelliJ. When working on react code, I usually switch over to VS Code. Feel free to use what makes you feel comfortable.