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

1000 questions
132
votes
20 answers

How do you install Node.JS on CentOS?

I've found numerous installation instructions for Node.js but they all seem so complicated -- I'm not a super sys admin but I can get around. I have yum on the system, but I didn't find any node.js packages, and I'm not sure how to compile code on…
qodeninja
  • 2,723
  • 10
  • 31
  • 33
52
votes
12 answers

Docker COPY issue - "no such file or directory"

In my Dockerfile I have the following 'COPY" statement: # Copy app code COPY /srv/visitor /srv/visitor It should go without saying that in my host system, under the "/srv/visitor" directory, there is indeed my source code: [root@V12 visitor]# ls…
dlyk1988
  • 1,644
  • 4
  • 24
  • 36
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…
naivedeveloper
  • 581
  • 1
  • 4
  • 6
25
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
  • 919
  • 3
  • 11
  • 13
24
votes
1 answer

Hostname to Localhost with Port - OSX

I am trying to run multiple Node.js web servers locally on my machine. Because the code I'm writing needs to reference a domain name I'd like to keep a convention of dev.myHost.com and point that to the non-port-80 service running from Node…
mondo
  • 383
  • 1
  • 2
  • 4
22
votes
4 answers

map directive is not allowed here

I am following this tutorial https://medium.com/startup-founder-panel/deploying-a-meteor-app-with-nginx-from-scratch-1332b32e99a5 When I do sudo nginx -t I get nginx: [emerg] "map" directive is not allowed here in…
Hayk Safaryan
  • 343
  • 2
  • 3
  • 10
22
votes
3 answers

Node.js is not accessible from external IPs on Ubuntu

I'm sure this is very noobish, so forgive me. I'm trying to run a node.js server on port 8080 of my ubuntu 10.04. Here's the result of iptables -L on the server: Chain INPUT (policy ACCEPT) target prot opt source destination …
Mikael Gramont
  • 323
  • 1
  • 2
  • 4
20
votes
1 answer

The following packages have unmet dependencies: nodejs : Conflicts: npm

I followed this gist https://gist.github.com/Goddard/5500157 to install nodejs and npm, but after running it neither node --version or npm --version could be ran, giving an error of command not found. I was able to uninstall nodejs, but had to go…
lumberjacked
  • 377
  • 1
  • 4
  • 9
19
votes
3 answers

Run multiple servers on the same port

I would like to run a XAMPP server, and a Nodejs server on the port 80. If the server get a HTTP request, then XAMPP will handle it, if the server get a Websocket request, then Nodejs How is it possible? If a port is already in use, then I can't…
iter-ator
  • 211
  • 2
  • 5
19
votes
1 answer

nginx: connect() failed (111: Connection refused) while connecting to upstream

I keep seeing the below error message's in the error log, I can access all of the resources but I'm unsure as to why the error is flagging. error: [error] 13368#0: *449 connect() failed (111: Connection refused) while connecting to upstream,…
Tam2
  • 293
  • 1
  • 2
  • 4
19
votes
4 answers

How do I configure Nginx proxy_pass Node.js HTTP server via UNIX socket?

I am trying to configure a Nginx server to connect to a Node.js HTTP server via a UNIX domain socket. The Nginx configuration file: server { listen 80; location / { proxy_pass http://unix:/tmp/app.socket:/; } } (according to…
pvorb
  • 980
  • 3
  • 10
  • 15
18
votes
6 answers

Any ideas on how to run maintenance on a site that is always under use?

I help out with a large gaming site in Australia. We run competitions from 7am local time to 1am the next day, every day of the week. We haven't skipped a day since the site was released. Naturally, this makes maintenance extremely hard to run, and…
cheese5505
  • 301
  • 1
  • 9
18
votes
4 answers

Starting a forever process in a Jenkins build step?

I'm running a shell command at the end of a Jenkins deployment to restart a forever script: npm install && forever stop app.js && forever start -a -l /var/log/forever.log app.js When I run that as a user jenkins everything works fine and the…
Patrick
  • 351
  • 1
  • 3
  • 11
17
votes
1 answer

Configuring Apache 2.4 mod_proxy_wstunnel for Socket.IO 1.0

I'm trying to configure Apache 2.4 for proxying the websocket connection for socket.io to a node.js websocket server, using mod_proxy_wstunnel. We had this working fine with socket.io 0.9, but with the 1.0 release they changed the socket endpoint…
Twipped
  • 613
  • 2
  • 7
  • 10
16
votes
1 answer

Where is the private key after using certreq for CSR generation on Windows 10?

I tried to follow the website below for instructions on how to generate the CSR for my web server: http://www.entrust.net/knowledge-base/technote.cfm?tn=8649 However, it only generates the CSR. Where is the private key? I was told that the key is…
Chong Lip Phang
  • 265
  • 1
  • 2
  • 7
1
2 3
66 67