Sample code for
http://www.megadix.it/blog/create-react-app-servlet/
- Build project using Maven:
mvn package
The project is configured to build local profile by default.
-
Deploy
create-react-app-servlet.warto your favourite servlet engine -
Access application at
http://localhost:8080/create-react-app-servlet/
Note: depending on your environment you would need to change PUBLIC_URL and REACT_APP_ROUTER_BASE in profiles. For example, Weblogic uses port 7001 instead of 8080.
To produce a production build, run maven with the -Pprod switch:
mvn package -Pprod