An example of building a war of create-react-app on Maven
- build
- create-react-app
- maven
- starter
- template
- war
- create-react-app
- JDK >= 1.5
- Maven
- Node
- Tomcat or another servlet container - for running
npm run build:war
Now the resulting cra-maven-war.war is in the target directory.
Copy the cra-maven-war.war to the webapps directory of the Tomcat server.
Wait a few seconds for deployment.
Run http://localhost:8080/cra-maven-war from the browser
Rename cra-maven-war.war for example to cra-maven-war-another-path.war.
Deploy it to the Tomcat.
Run http://localhost:8080/cra-maven-war-another-path from the browser
Deploy React Applications in a Servlet Environment by Dimitri De Franciscis (megadix)
Licensed under the MIT license.