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

1037 questions
46
votes
2 answers

How to use node.js as a production web server?

I'm currently developing a project using node, and as I'm approaching the launch, I'm struggling to find resources on how to setup node for use on a commercial, production server. Most resources I have seen have consisted of contrived, simple…
27
votes
7 answers

how to stop node.js server

I run the node server by typing node server.js from a putty terminal to get it running. Now i want to stop the server how should i do it? I tried pressing the pause break button on the keyboard. But it is not stopping it.
Rahul Mehta
  • 1,019
3
votes
4 answers

Reinstall Node.js

What's the best way to reinstall node.js?
2
votes
1 answer

Does the "forever" daemon cache the Node.js script?

Does the "forever" daemon know if I updated my Node.js script? Is it safe for me to change my Node.js script if the forever daemon is actively running in the background?
Miko
  • 1,799
  • 4
  • 23
  • 28
1
vote
1 answer

How to stop serving static files in Nodejs/expressjs?

I serve a temporary directory using var express = require("express"); var serveIndex = require("serve-index"); app.use('/tmp_dir', express.static('/var/www/tmp')); app.use('/tmp_dir', serveIndex('/var/www/tmp')); At some point, I may…
ballatom
  • 123
1
vote
1 answer

NodeJS | http | Doesn't work on LAN

Code: var express = require('express'); var connect = require('connect'); var app = express(); var server = require('http').createServer(app); var io = require('socket.io').listen(server); var path = require('path'); server.listen(3000,…
1
vote
1 answer

How can I force a node.js application to respawn after the database connection drops?

I use forever to run my Ghost blog platform atop node.js. As I understand it forever should watch for the node to drop and restart it automatically. However, if I yank the db out from under the app it doesn't recover as expected when the database…
CJONES
  • 317
1
vote
0 answers

Requests are making it to my app server, but not into node.js -- why?

I detailed in this question on StackOverflow how some random requests are not making it from the client to my Node.js app server, resulting in a gateway timeout. In summary, identical requests are, at random, not even making it far enough to trigger…
1
vote
1 answer

Node.js npm install all packages

How can I tell npm to install all packages available in its repository? I have to work offline, so I'm preparing a virtual machine to code in node.js and I don't know if I may end up needing some package in the future, so I wish I was able to…
0
votes
2 answers

If I install node.js on my server do I need to install Ubuntu or other server OS?

Question If I install node.js on my server do I need to install Ubuntu or another server OS? Background: I'm creating a Droplet on Digital Ocean. I am going to use the droplet to host a website that will have a Discourse powered forum. When I…
DR01D
  • 350
  • 1
  • 3
  • 11
0
votes
1 answer

How to make app.js run public

Ok, I have searched for hours on this, nothing is working the way it should so I have to be doing something wrong. It works fine on localhost:port but I can't get it to work remotely. Here is the app.js var http = require('http'); var express =…
Seva
  • 1
0
votes
0 answers

NodeJS - Is host reacheable without ICMP

I've the need to check if an host is reacheable or not. This machine have ICMP protocol disabled, so i can't send a simple "ping" on it. The machine is up, network is ok but i cant ping it. There is a way to "understand" if an host is reacheable…
Mistre83
  • 101
0
votes
1 answer

Node.js app dying when over 300 people on it at the same time

I have a node.js app running on a Digital Ocean MEAN droplet. When over 300 people are accessing it at the same time it just hangs. At first I noticed that it was opening over 1000 files at once. I have moved a bunch of the static images to Amazon…
0
votes
1 answer

Trouble adding a backend to statsd

npm install -g statds npm install -g statsd-ganglia-backend This does not deliver the new backend to /usr/local/lib/node_modules/statsd/backends. What do I need to copy for myself?
bmargulies
  • 2,403
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
1
2