- Build and start the app: gradle bootRun (http://localhost:8080)
- Develop a feature and watch for front-end changes: npm run watch (http://localhost:9090)
- Java Spring Boot Backend
- Server side rendered frontend with isomorphic React (rendered via .ejs template view engine).
- Progressively enhanced (works without javascript)
- Using Server Sent emitters when javascript is enabled, using post/redirect when javascript is disabled (without noticing any difference in the frontend)
- Gradle for Java back-end
- Npm & webpack for bundling Javascript (instead of the default WebJars used in Java/Gradle)
- Be sure to use JDK 8u60 or later in order to have the better Nashorn version available.
- Reusing front-end javascript validation files in the back-end becomes possible
- Serverside rendering of modern javascript libraries/frameworks (like React) becomes possible in Java
- Usage of - easy to implement - Server Sent Emitters in stead of Sockets..for one way communication only
- Performance of Nashorn for rendering seems very slow
- TO DO: use J2V8 in stead of Nashorn
Isomorphic Webapps on the JVM with React.js and Spring Boot
Spring-react-isomorphic presentation
Integrate webpack and npm in this setup
Script template views in spring + J2V8 in stead of Nashorn
More details about Spring Script Templating in Spring Framework reference manual.