Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Is it possible to integrate Node.js in a java web application for some functionalities?

Hi, I am using Singly Api to connect to all other social media apis like Facebook, Twitter, Instagram etc. and I want to use Singly - Node.js api for registration purposes but for database interactions I am using Spring Data framework. How can I create a bridge between Node.js and Java? I do not want to use Redis pub/sub feature since it'd be extra work for me to configure Redis. Currently, I am using MongoDB for database.

I'd be really grateful if anyone could reply as quickly as possible.

Thanks, Swati

2 Answers

Jim Hoskins
STAFF
Jim Hoskins
Treehouse Guest Teacher

You of can integrate multiple apps in different languages to act as a larger app, but it is going to require a lot of work. You would be creating two apps, and then have to build some communication layer or API to talk between the two. The only reason to do this is if there is such a huge benefit to using two separate environments that it outweighs the cost of integrating them, which isn't very often.

Hey Jim, Thanks for your response. I think you are right. Currently, I am in the initial phase of my project and we have to launch it by May 9th, 2013. So I think I would rather go with Java and not do half Node.js and half Java.