What is the difference between writing Spring boot REST API backed SPA
- inside one project, javascript served from Spring's app server
- two projects, Spring backend server app and javascript frontend in separate node server
Are there any benefits of the first over the other other. For me separate project are more clean. I'm pretty new to javascript so I'm affraid to clutter the java project with all the folder, files and javascript build processes. Also there are more i.e. separate vuejs templates than vuejs-spring-boot templates.
Is there any way, to somehow connect both solutions, by generating one js file for the SPA and serv it from Spring.
Regarding authentication I can utilize Spring MVC in first option, the second one is asking for some token authentication.