1269
votes
2answers
258k 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 ...
213
votes
5answers
63k 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 ...
42
votes
9answers
28k 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 ...
144
votes
13answers
35k 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 ...
212
votes
10answers
73k views

Can I use jQuery with node.js?

Is it possible to use jQuery selectors/dom manipulation server-side using node.js?
61
votes
7answers
21k 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.
21
votes
3answers
13k 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 ...
622
votes
8answers
60k 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 ...
94
votes
3answers
65k views

NodeJS: Write to file

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. Thanks.
63
votes
5answers
44k 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 ...
275
votes
10answers
80k 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 ...
57
votes
6answers
26k 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. ...
23
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 ...
167
votes
24answers
59k 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 ...
81
votes
4answers
53k views

Good beginners tutorial to socket.io? [closed]

I am very new to the world of webdevelopment and jumped into the bandwagon because I find the concept of HTML5 very interesting. I am fairly confident on working with canvas and would now like to move ...

1 2 3 4 5 48
15 30 50 per page