Question

I would like to know if it is possible to use Spring MVC (using Gradle) for backend stuff together with node.js as the web server,and how? Do they communicate via JSON?

The reason I would like to use node.js is that I want to use some modules such as Yeoman (to use the angular-generator), grunt, bower, socket.io etc. and Angularjs (for routing, controllers etc.)

I would also like to use a sql database (mysql or sqlite) instead of a nosql database such as mongodb.

How is this achieved? Do I just add node.js for the frontend stuff to my Spring project? Are there any tutorials I can follow or repositories I can check out?

Edit

I have checked out JHipster but its not exactly what Im looking for. Is there a simpler approach where you just combine the two and use gradle instead of maven? I felt like JHipster was just a bit too much.

Was it helpful?

Solution

Although it's not exactly what you are asking for, check out JHipster. It's a yeoman generator that bootstraps a Spring backend project with AngularJS in the frontend (along with power of Bower and Grunt)

I posted this because JHipster it seems to meet most of your requirements and is probably a lot easier to use than some ad-hoc integration of Spring and Node.js

OTHER TIPS

Here is a spring article from a while ago of using spring, mongo, and nodejs in a project together.

Additionally, spring has 2 guides for accessing relational data such as mysql: relational-data-access and accessing-data-jpa

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top