Tagged Questions
1269
votes
2answers
341k views
How do I get started with Node.js
Are there any good resources to get started with Node.JS? Any good tutorials, blogs or books?
Of course, I have visited its official website http://nodejs.org/, but I didn't think the documentation ...
799
votes
9answers
78k views
How to decide when to use NodeJS?
I am a n00b in this kind of stuff but lately I've been hearing a lot about how good NodeJS is. Considering how much I love working with jQuery and Javascript in general, I can't help but wonder how to ...
256
votes
5answers
79k views
What is the purpose of NodeJS module.exports and how do you use it?
I cant seem to find any info on this but it appears to be a rather important part of NodeJS as I often see it in source code.
According to the node docs :
module
A reference to the ...
159
votes
13answers
41k views
Node.js on multi-core machines
Node.js looks interesting, BUT I must miss something - isn't Node.js tuned only to run on a single process and thread?
Then how does it scale for multi-core CPUs and multi-CPU servers? After all, it ...
42
votes
9answers
34k views
node.js execute system command synchronously
I need in node.js function
result = execSync('node -v');
that will synchronously execute the given command line and return all stdout'ed by that command text.
ps. Sync is wrong. I know. Just ...
61
votes
7answers
23k views
How to use redis PUBLISH/SUBSCRIBE with nodejs to notify clients when data values change?
I'm writing an event-driven publish/subscribe application with NodeJS and Redis. I need an example of how to notify web clients when the data values in Redis change.
229
votes
10answers
83k views
Can I use jQuery with Node.js?
Is it possible to use jQuery selectors/DOM manipulation on the server-side using Node.js?
116
votes
3answers
83k views
Writing files in NodeJS
I've been trying to find a way to write to file when using NodeJS but with no success. Can you help me with this?
22
votes
3answers
15k views
socket.io.js not found
For some reason my node server cannot serve the route /socket.io/socket.io.js, I always get a 404 error.
I tried compiling different node versions (current is 0.6.13 which also runs on server, where ...
81
votes
5answers
56k views
How to use underscore.js as a template engine?
I'm trying to learn about new usages of javascript as a serverside language and as a functional language. Few days ago I heard about node.js and express framework. Then I saw about underscore.js as a ...
72
votes
6answers
33k views
Rails - Could not find a JavaScript runtime?
I created a new Rails project using rails 3.1.0.rc4 on my local machine but when I try to start the server I get:
Could not find a JavaScript runtime. See here for a list of available runtimes. ...
181
votes
23answers
68k views
Is there a template engine for Node.js? [closed]
I'm experimenting with building an entire web application using Node.js. Is there a template engine similar to (for example) the Django template engine or the like that at least allows you to extend ...
315
votes
10answers
96k views
How to debug node.js applications
How do I debug a node.js server application? Right now I'm mostly using alert debugging with print statements like this:
sys.puts(sys.inspect(someVariable));
There must be a better way to debug. I ...
44
votes
5answers
14k views
Coordinating parallel execution in node.js
The event-driven programming model of node.js makes it somewhat tricky to coordinate the program flow.
Simple sequential execution gets turned into nested callbacks, which is easy enough (though a ...
24
votes
4answers
7k views
Pattern for CoffeeScript modules
While reviewing the source code for CoffeeScript on Github, I noticed that most, if not all, of the modules are defined as follows:
(function() {
...
}).call(this);
This pattern looks like it ...