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
0 answers

OSS Server Written in Javascript, Linux Based Needs MIME Configuration

Scenario: There is a popular OSS application named Potree, hosted in GitHub. I am getting minimum support from its author, a very talented but busy guy who does not know much Linux or Apache. This is the great app that I desire to conquer and give…
0
votes
1 answer

Correct Way to Install Node.js in a Multiuser Server?

I have to acknowledge being an old timer U*ix system administrator. Software to be used by everybody had two possible locations: /usr/bin /usr/local/bin The best example is gcc and family. Now I find myself in a new world. My node installation lives…
0
votes
1 answer

What Prevents a Server Owned by a Non-Priviledged User to be Reached by Apache?

There is a popular Open Source application written in Javascript Node.js that listens to port localhost:1234 under my regular, non privileged account. When connecting from localhost everything works perfectly. The idea, however is to make that…
0
votes
0 answers

Should I compile Node.js from source on an Amazon Lightsail smallest instance?

I'm using the cheapest Amazon Lightsail instance to set up an Nginx + Node.js server. I have compiled Nginx successfully already, however it's taking too long to compile Node.js. Is this is even a good practice to compile Node.js from source? Should…
gregn3
  • 101
  • 1
0
votes
1 answer

nginx does not set x-forwarded-for header

I want to get the IP adress of the client that visits my page. My app is running behind a proxy so i set this configuration to my nginx file: proxy_set_header X-Forwarded-For $remote_addr; Now i try to get the IP adress like this in…
bill.gates
  • 101
  • 4
0
votes
1 answer

Google App Engine Fetch Slow Speeds

I'm running a NodeJS Google App Engine service that retrieves a large file and sends it to a Virtual Private Server hosted on Digital Ocean or AWS. The file is about 5MB and takes up to a minute to send in some cases and often times out. Sending the…
Josh
  • 109
  • 3
0
votes
1 answer

Is it possible to forward a port for one app only?

I have a Ubuntu server (18.04) which hosts some websites on Apache2, and also has a node app running. I want the node app to use SSL, but as it's not running as root it doesn't have permission to listen to ports below 1024. So I set up an iptables…
DisgruntledGoat
  • 2,629
  • 4
  • 28
  • 36
0
votes
1 answer

How to serve / from a static file, but the rest of the root directory from a proxy (NodeJS)?

I've tried the following: # this *should* serve the root from a static index.html file location = / { try_files $uri $uri.html $uri/ /index.html; } # resources are served directly by nginx location /img { } …
fadedbee
  • 2,068
  • 5
  • 24
  • 36
0
votes
1 answer

What's so good about having a job queue?

I am currently building an API that sends transactional emails to users. I do this with a job queue, bull in particular. During development, something crossed my mind; where are these jobs actually executed? Currently, I send these jobs through bull…
0
votes
1 answer

Apache reverse proxy to nodejs server on CentOS 7 (WHM)

I'm trying to setup my site on the server. I've uploaded it and it's currently running on the server but the problem comes when I try to setup a reverse proxy on the domain so that I can access the site. I had followed the WHM documentation on how…
James
  • 1
  • 1
  • 3
0
votes
0 answers

Configure Apache Web Server (shared hosting) to provide simultaneous Web and Websocket Access

I'm trying since some days to find a way to configure simultaneous websocket and web server connections with one same Apache Web Server I have on a shared hosting basis. Now, before giving that up and definitely switching to a dedicated hosting…
DevelJoe
  • 187
  • 3
  • 11
0
votes
1 answer

secure reverse proxy apache server still getting requests to other domains in access log

I've been trying to setup apache (port 80) as a reverse proxy to a nodejs server (port 3000) and I made the mistake of launching my apache server with ProxyRequests On. I discovered this error after hundreds of thousands of spam proxy requests…
Dan
  • 3
  • 1
0
votes
1 answer

Apache seems to redirect to domain name ever when not running

I'll preface this by saying I don't have a lot of experience with Apache. But currently I am running a Node process that's listening on port 8080. However, when I access that port via 'ipaddress:8080', it redirects to the site domain name per the…
Anthony
  • 211
  • 1
  • 3
  • 8
0
votes
1 answer

Cannot reach Node.js application over HTTPS

I have an node.js application that is running on port 3000. Infront of it i run an nginx reverse proxy. It works fine for port 80. I have tried to install an certificate with certbot. Now i have the certificate and set up my proxy to redirect all…
bill.gates
  • 101
  • 4
0
votes
0 answers

nginx - dns resolution in njs

I need to solve a simple DNS query using njs in nginx. I've searched but it seems that there isn't a 'native' function for doing this. So I'm trying to use dns-lookup module for node.js I've installed it using npm install dns-lookup, then I've tried…
Fabio
  • 55
  • 1
  • 7