Take the 2-minute tour ×

I'm wondering if using Node.js (express.js) is the best option to go for a complete website. I've been using Rails + Node.js and am wondering if this is still the best option or if I should move completely to Node.js.

Are there websites built completely with node.js? I imagine it must lack many things Rails offers.

share|improve this question
Rails and node are really for two different purposes –  basicxman Jun 19 '11 at 19:19
Express.js intends to change that. I'm just wondering if it is worth it. –  donald Jun 19 '11 at 19:30
It depends. How comfortable are you with node.js. How many of the higher level / abstractions of Rails do you need? Given by the amount of questions you've asked, you must be an expert by now so go 100% node.js –  Raynos Jun 20 '11 at 5:58
add comment

4 Answers

up vote 12 down vote accepted

Express.js is more akin to Sinatra. They're simpler frameworks than rails.

Express's list of sites is fairly small http://expressjs.com/applications.html

So I think it's also good to look at Sinatra's list http://www.sinatrarb.com/wild.html

So to answer your questions in reverse order. Yes it lacks all the features of rails. Yes there are sites written completely in Express. And going to 100% Node.js might be the right decision for your site.

It depends on which features you'd miss and what performance you need.

share|improve this answer
add comment

I imagine it must lack many things Rails offers.

I gave a short list below but I would like to know what you could be missing and I think(almost certain) we can give you some alternatives on node.js.


node.js is getting pretty complete and I think you can run your entire site using only node.js using for example the following modules. I assume you know about npm. If not I really advice you to google for it and learn that. To search npm you can use http://search.npmjs.org:

web framework:

  1. High performance, high class web development for Node.js

  2. Socket.IO aims to make realtime apps possible in every browser and mobile device, blurring the differences between the different transport mechanisms. https://github.com/learnboost/socket.io-node

I believe with these two web-frameworks you can create a lot of sites. For example express is a very powerfull web framework and supports a lot of cool things like:

  • session support.
  • a lot powerful template engines. I like Jade for example. You could also share these between client and server a lot of the times easily.
  • excellent routing.

just to name a few.



  2. MongoDB (from "humongous") is a scalable, high-performance, open source, document-oriented database. Mongoose is a MongoDB object modeling tool designed to work in an asychronous environment.

With those two databases I think you should be able to accomplish most of your tasks. The nice thing is that Redis is extremely fast/simple advanced KV-store(dataset in memory/also supports VM) and supports replication while Mongodb is more completely(slower then redis) and also supports sharding.


  1. Authentication and authorization (password, facebook, & more) for your node.js Connect and Express apps.

Like I said previously you can get a long way with only these modules.

share|improve this answer
I would recommend github.com/christkv/node-mongodb-native if you are using mongo. It has a lot of developers working on it, and it is easy to use. –  RobKohr Sep 7 '11 at 20:25
@RobKohr Mongoose(I describe above) is using node-mongodb-native under the covers, but has some really nice abstractions on top of that :). See this link for example for more info: blog.mongodb.org/post/812003773/node-js-and-mongodb :) –  Alfred Sep 10 '11 at 20:00
add comment

I'm not sure, but I guess it's perfectly possible. I have built complete sites using plain server side javascript for years without problems. The advantage of node.js seems to be its event driven model and things like socket.io. I just started experimenting with it, I'll probably will try porting an existing site to node.js.

Here you can find a large list of sites built with node.js.

Finally, you may want to read: What it’s like building a real website in Node.js

share|improve this answer
also to remember that node.js is built on the V8 JS Engine, which is the same one that is used in Chrome so it is extremely fast. –  hellatan Jun 19 '11 at 21:15
+1 for that travisglines.com link, interesting read –  Danjah Jun 21 '11 at 2:24
add comment

Yes, as of now node.js lacks many (well, at least a few) things rails offers. Eventually the set of available node.js modules will collectively provide good alternatives to RoR across the board. Or at least different (and often more modern) approaches to the same fundamental problems. There are still some important things missing in the node.js ecosystem including a good ORM for postgresql (rails has ActiveRecord which is great) and a good DB schema management subsystem. Both of these do not exist in the node.js ecosystem as of this moment, but surely they will be there in due time. Rails has these down pat right now.

There are some tricks node.js has that RoR doesn't. Debugging in node.js is more seamless than RoR and express.js is more flexible. Express is the library approach (you tell it what to do) whereas rails is the framework approach (you fill out the boilerplate it creates for you). There are also some fantastic things like stylus and jade, which have equivalents in rails, but when you have a full app written in one language (either javascript or CoffeeScript, which I prefer) and everything is in a modern node.js/TJ Holowaychuck style, you get a level of cohesiveness that is really nice to work within.

The other thing to keep in mind is that while the list of available node.js modules is quite impressive, many of them are not as mature and battle-tested as their rails/django analogs. It's hit or miss, so beware.

share|improve this answer
add comment

Your Answer


