Being both event-driven servers, why node.js needs async code where Nginx doesn't?

The question is in the title. In another words, if Nginx works as the same event-driven async IO model of node.js, why doesn’t it requires writing async style code? I know, Nginx is NOT actually executing any code, rather proxying them to who can. Then why doesn’t node do so? Are we missing anything in […]

IISNode and Express 3 yields http 403.13 error

I am setting up IISNode on IIS 7 locally on my Win7 box. I followed the instructions on the site and the samples are working fine. I created a new website and AppPool in IIS Manager to run a brand new shell of an Express site. I’ve added the web.config to tie the iisnode module […]

how to send a put request from html form in express and node

I have a form for editing an object and I want to handle it properly using express 3.x with node.js edit item route: /item/edit shows a form for editing the object. I figure I have three options: 1) place a hidden field with a value of “edit” so I can handle it in express properly […]

nodejs memory profiling

Need to profile node process. i’ve some memory leaks in production, after some days of running node process. i’ve tried node-inspector + v8, but it doesn’t work, in new version of node-inspector there is no Profile tab. and in old version when i start profiling error is fired and debugging stopped. i’ve also tried, […]

NodeJS – long polling/pushing/rejeverse ajax? What do i need to push live data isntantly to the web?

Im fairly new to NodeJS(using and have this sick obsession with it lately. I would like to know while using NodeJS. Is it possible to stream the contents of a basic html page, not large, and not special to lets say 10 concurrent users. However if there is a change to that html page […]

Running node app from grunt with watch

So, I have the grunt file below. I’m wanting to add a task that will start my node app and watch for changes in a directory and restart. I have been using supervisor, node-dev (which are great) but I want to run one command and start my whole app. There has got to be a […]

Openshift – 503 Service Temporarily Unavailable when i am accessing the app

I got an app hosted on Openshift here , using node.js and mongo db. It was running perfectly yesterday and today when i am accessing the same, i am getting Service Temporarily Unavailable Error I searched some threads and tried this command rhc tail -a news and result was npm ERR! node -v v0.6.20 npm […]

How to authenticate google user using node.js

I am using node.js for my application and I have to do user authentication via google. I have seen passport-google module but I did not get any idea from that and there is no variable for username and password. One thing is that My application is desktop application .

Using Node to stream Video to HTML5

I’ve been playing around with node and websockets and built a small test app that streams audio using websockets. The server breaks apart the mp3 using createReadStream, throttles the stream using node-throttle and sens the binary data using the “ws” module. On the client side I pick up the chunks on the websocket and use […]

How to (re-)use redis client connections in nodejs/express?

Given a simple example: var express = require(“express”) var redis = require(‘redis’) var app = express() var client = redis.createClient() app.get(‘/’, function(req, res) { req.connection.setTimeout(2 * 1000) client.set(“test”, 1, function (err, resp) { res.send(‘Hello World’) }) }) app.listen(80) Redis connection doesn’t need to be re-established for every request, does it? Do you need to use […]

Node.js is the Best Javascript runtime in the world.