One way is to build React with Java . In the development phase, we can run React and Java on separate ports. The interaction between these two happens with proxying all the calls to API. In the production phase, you can build the React app and put all the assets in the build folder and load it with the java code.