A single project that combines a react/redux front end with a spring boot backend running on one server.
When building this application the front end component will be minified to static files and bundled up into a jar. The backend will then use that frontend jar at runtime and serve it when the application is opened in a browser.
Setup project:
- Run
npm install -g yarn
to install Yarn(a better npm) globally - Clone the repo using
git clone
cd
into the project
Complete install, build, and packaging of both the front and back-end components
- Run
gradle
to build everything and run all tests
Build, test, minify, and create a jar of the front-end code
- Run
gradle buildFrontend
Build, test, and create a jar of the backend-end code (front end needs to be build first)
- Run
gradle build
Build, test, and start front-end with a mock back-end using json-server
- Run
gradle startFrontend
- Navigate to: localhost:3000
Start full stack application after a build
- Run
gradle bootrun
- Navigate to: localhost:8080
Helpful Links
- Link to react-router example used for frontend piece