Questions tagged [node.js]

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications. NOTE: Please read the Tag-Wiki before asking questions.

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript Engine.

Node.js - or just Node as it's commonly called - is used for developing applications that make heavy use of the ability to run JavaScript both on the client, as well as on server side and therefore benefit from the re-usability of code and the lack of context switching.

It's also possible to use matured JavaScript frameworks like YUI and jQuery for server side DOM manipulation.

To ease the development of complex JavaScript further, Node.js supports the CommonJS standard that allows for modularized development and the distribution of software in packages via the Node Package Manager.

Applications that can be written using Node.js include, but are not limited to:

  • Static file servers
  • Web Application frameworks
  • Messaging middle ware
  • Servers for HTML5 multi player games

When asking questions about Node.js, you should:

  1. Make sure to check the official API Docs before asking, your question might be trivial.
  2. Isolate the problem and reproduce it with as little code as possible, if you can also use an online tool like JSApp for that, it's even better.
  3. If the question has nothing do with anything that's Node.js specific, please consider asking it as a question instead.
  4. Mention which version of Node.js you are running, when in doubt use node -v.
  5. Make sure to only use the Tag, since is ambigious.

Interesting Questions and Answers

Common Topics

Useful Links

Tutorials, Guides and Books

Talks and Presentations on Node.js

1026 questions
0
votes
1 answer

How to monitor several nodejs servises by upstart and monit?

I have created an upstart script in order to daemonize a node.js app. The upstart script is the following: description "app_name" start on startup stop on shutdown script export HOME="/home/ubuntu/nodeapp" exec sudo -u nodejs…
Erik
  • 203
  • 2
  • 5
  • 14
0
votes
1 answer

What causes SocketException (9001) handling request in node.js app and MongoDB ReplicaSet?

I have a simple node.js application that makes a single call connection call to my ReplicaSet. Things were actually working fine earlier today and nothing was changed in the application, now my connection is failing (silently) and I'm seeing the…
0
votes
1 answer

nginx not starting with multiple nodejs apps

i have this config in sites-enabled/default upstream domainone.com.ar { server 127.0.0.1:9000; } server { listen 80; server_name www.domainone.com.ar; rewrite ^/(.*) http://domainone.com.ar/$1 permanent; } server { listen 80; listen…
0
votes
1 answer

sudoers nopasswd switch user and run node not working

I'm trying to prevent a password prompt on a command that runs node as the www user by adding the following line to the bottom of my /etc/sudoers file: gituser ALL=(ALL) NOPASSWD: /usr/bin/sudo -u web-user NODE_ENV=production /path/to/node app.js I…
techjacker
  • 133
  • 6
0
votes
2 answers

Deploying node.js on Appfog?

I am developing an online chat application in HTML, CSS and JavaScript. I am using node.js and socket.io to make it work. I recently realized that I need to host my app on a server. Fortunately I found appFog which is free. I created a account and…
Joe Slater
  • 127
  • 1
  • 7
0
votes
1 answer

Trying to get Apache and nodejs to play nice together, getting "setsebool: SELinux is disabled."?

I am running Ubuntu, and an Apache server. I wanted to try out nodejs, and I wanted to run it through a virtualhost on Apache. I read this article and tried to follow the…
Josh
  • 181
  • 4
0
votes
1 answer

First-time Developer's Basic Cloud & Node.js Questions

I'm trying to get a handle on the concepts and best practices of cloud development with Node.js, because I haven't found a good explanation. When you buy a virtual machine from Rackspace or wherever, do you get SSH access and then you can run…
winduptoy
  • 125
  • 4
0
votes
1 answer

Setting up multiple applications on one server within directory paths

I am working with node.js and I am trying to figure out a way to have a rather different server configuration. I would like to have three "apps" run. index app1 app2 Index can run on port 80, and would assume the root domain name domain.com. I…
ThomasReggi
  • 621
  • 2
  • 10
  • 25
0
votes
1 answer

How to run nodejs on linux platform

How to run node.js on host with linux platform? To run node.js on localhost with windows operation system is simple I download package from nodejs.org/download/ and I execute Windows Installer (.msi) I go to console command line and I type node…
rotem
  • 11
  • 3
0
votes
1 answer

gcc sandboxing tool - AppArmor / CHROOT jail on Ubuntu 12.04

We have a Node application as the front end to a C++ sandboxing tool, which compiles code using gcc and outputs the result to the browser. e.g. exec("gcc -o /tmp/test /tmp/test.cpp", function (error, stdout, stderr) { if(!stderr) { …
StuR
  • 167
  • 2
  • 10
0
votes
2 answers

Node.js on via DynDNS

I have never used Node.js but since I am developing a browsergame that needs (almost) "realtime" communication, I am planning on using Node.js for this. To get started, I wanted to use a home server (normal computer) that is conntected to a dynamic…
Shlomo
  • 103
  • 4
0
votes
2 answers

Node.js, Nginx and Varnish with WebSockets

I'm in the process of architecting the backend of a new Node.js web app that i'd like to be pretty scalable, but not overkill. In all of my previous Node.js deployments, I have used Nginx to serve static assets such as JS/CSS and reverse proxy to…
Boop
  • 11
  • 2
0
votes
1 answer

Node.js Production Server and Ubuntu Users

I'm setting up a production server on Ubuntu 10.04 using this technology stack: Nodejs Nginx to serve static contents Mongo Redis Upstart for running applications as services Monit for monitoring node application and nginx server The server will…
baffonero
  • 1
  • 1
0
votes
1 answer

nginx: 502 bad gateway while using node.js varnish and stunnel

I've been following this tutorial, and everything seems to run OK, except for my nginx setup. My node.js application runs on port 1337, varnish runs on port 80, stunnel on 443 and nginx on 8080. I can reach my app correctly when i specify the port…
Ezeke
  • 103
  • 1
  • 2
0
votes
1 answer

Sending signals to running Upstart job

How can I send signals or events to a running Upstart job? I run a Node.js HTTP server with Upstart as a daemon and sometimes need to put it into maintenance mode for backups and stuff. I'd like to send a signal to the node process, which then will…
buschtoens
  • 169
  • 1
  • 11