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
-1
votes
1 answer

Hosting node application on separate computer than Apache web server

I am attempting to create a virtual host to connect a computer running a node application (Computer B 12.34.56.78) to a computer running my Apache web server (Computer A 12.34.56.77). Everything I have seen so far just deals with serving a node…
-1
votes
1 answer

node.js SyntaxError: Unexpected token >

I'm trying Google Cloud to host my node.js app. On Windows 10 I have node v7.9.0 and on Google Cloud it's using node v6.9.0 On Windows 10 it runs flawlessly. On google cloud it gives me this…
-1
votes
1 answer

Nginx rewrite url from :port to "login"

Good evening I am new to nginx i read around and am a bit confused between redirecting and rewrite what i am looking for is a way to change www.abc.com:3000 to www.abc.com/login location /login { proxy_pass http://0.0.0.0:3000; rewrite…
vic-3
  • 101
  • 1
-1
votes
2 answers

(Ubuntu Server) Why does /usr/bin/node --version show v6.0.0 when /usr/bin/nodejs --version show v4.3.3?

I recently had nodejs v6.0.0 installed. I ran sudo apt-get remove nodejs and reinstalled the LTS version using curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs After reinstalling I ran …
-1
votes
1 answer

Sending many record on client startup. Nginx 502 bad gateway too many open files

I have nodejs app that sending > 800 mongodb documents on client startup (execute only when a client access my app for the first time). Nginx as reverse proxy in front of node server. App server spec Digital Ocean CentOS 7.2 2GB Ram 2CPU MongoDB…
prime
  • 1
  • 2
-1
votes
1 answer

Port number required after url name?

I have followed along a digital ocean tutorial to deploy my node.js app onto VPS. Everything is working, but instead of reaching the app from myDomain.com, it's only available through myDomain.com:3700. myDomain.com only shows "Success! Virtual host…
Cameron Sima
  • 107
  • 2
-1
votes
1 answer

CentOS 6 script at server boot up

I have three terminal commands that I would like to execute when server boots up. How can I achieve this? I have seen many solutions, but none of them seems to be simple and working. Here are the referrals:…
Marko Tamburic
  • 181
  • 1
  • 1
  • 10
-1
votes
1 answer

Is "keeping alive connections" the smartest approach to access devices behind a router?

The problem I'm developing an IOT device that will connect to a common Wifi router. As you know in order to make this device publicly accessible from WAN you'll have to do some ports forwarding or DMZ in the router. But in this scenario I don't want…
DomingoSL
  • 365
  • 1
  • 4
  • 13
-1
votes
1 answer

Hiding services from port scan

Upon running a port scan on my server: 22/tcp open ssh (protocol 2.0) 80/tcp open http nginx 1.4.6 (Ubuntu) 443/tcp open http nginx 1.4.6 (Ubuntu) 3000/tcp open ppp? 3001/tcp open http Node.js (Express middleware) Is there a…
Chris
  • 101
  • 1
-1
votes
1 answer

Make Node.js app port not accessible on other domains

I have a server with Parallels Plesk as Server Control Panel, apache2 (with mod_proxy and mod_http_proxy), nginx and Node.js installed. On this server I have multiple domains and subdomains, but only one IP. If I start a node-app on e.g. port 1337…
-1
votes
1 answer

Configuring CentOS apache server to default to a specific port for ExpressJS and Node

Completely new to Linux and virtual private servers so please bear with me. I have a webapp built on ExpressJS and NodeJS that runs on port 5000 of my server, accessible via web by typing: http://00.000.000.000:5000. When you go to my non-port IP…
Jascination
  • 101
  • 4
-1
votes
2 answers

Configuring nginx to check for hard files in only a few directories,

For a node.js project I'm doing, I have a tree like this. ├── public │   ├── components │   ├── css │   └── img ├── routes └── views Essentially, I have the root to be set to public. I want all requests destined to /components/ /css/ /img/ To…
Evan Carroll
  • 2,373
  • 10
  • 34
  • 53
-1
votes
1 answer

Running WordPress and Ghost on Apache with mod_proxy

I currently have three WordPress sites hosted on Apache with virtual host files to direct the right domain to the right DocumentRoot. Ghost (node.js) just came out and I've wanted to tinker with it and just play around on one of my spare domains.…
-1
votes
1 answer

What type of amazon ec2 instance should i take ? And how many of them?

I will be hosting a website . Our initial target will be around 50,000 unique visitors a day . Files are served using apache/php and the realtime events (likes,comments) are handled using a nodejs server . Also i am using redis as key-value store…
AnuragD
  • 133
  • 1
  • 4
-1
votes
4 answers

installing gcc on CentOS

I want to install node.js on CentOS unfortunately i'm having trouble installing gcc (and all of the things that generally come with it in order to get node to even compile) on centOS via commandline. What I've tried so far sudo yum install gcc I…