views:

24

answers:

1

What's the best way to integrate a NodeJS app into an existing Rails app?

Rails app: http://www.rails.app

Nodejs app: http://node.rails.app or even http://www.rails.app/node

23-09-2010: After searching for some time, I think an approach would be to have 2 separate services:

  1. Rack (Rails) service, which would host the rails application.
  2. NodeJS service for the realtime component.

So, I guess what my question is aimed to, is server management: How can I properly configure a server to host the main app via any requests to http://www.rails.app/* but dedicate http://node.rails.app or http://www.rails.app/node to the nodejs component?

A: 

Just use Juggernaut 2. http://github.com/maccman/juggernaut

However, i would advise you to just stick to one of them. Either node.js or Rails. For rails you can give http://pusherapp.com a shot.

Shripad K
Thanks for the advice. The rails application is a (almost) production ready application, I just need to integrate a realtime module that won't kill my server. I'm still favored towards making separate services and link them together somehow.
Lonecat
Shripad K