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

Nginx return 500 Internal Server Error

Last night I was trying to upload photo on my website and I get error I trying to do console.log but they didn`t show anything.After some re-search I notice that disk usage of my server is full so I get AWS EBS but error is still there I try many…
mawerick_1
  • 13
  • 3
0
votes
1 answer

pm2 Multiple God Daemons and node process Spawning

I Have node apps unning using pm2.And it is spawning multiple pm2 daemon instead of one which is eating up all the memory. When I run ps aux | grep pm2 Command I see multiple God daemons for the pm2 process instead of one. I have a total of 10 pm2…
0
votes
1 answer

AWS Load Balancer 502 Bad Gateway

I have multiple node web servers hosted on EC2 with a Load Balancer, and some users are getting a 502 even before the request reaches the server. I don't have the logs of those requests inside the servers, that's why I am assuming that the request…
soltex
  • 101
  • 1
  • 2
0
votes
0 answers

Nginx + django +nodejs : Uncaught SyntaxError: Unexpected token '<'

This is first time using nginx and nodejs. I have two apps one is built using django and other is built using nodejs (expressjs +openvidu). I am trying to configure nginx, django app works fine, I am having trouble with nodejs. nginx is not serving…
0
votes
0 answers

htop does not show the real memory usage

I'm having a server running around 250 docker containers. Once they are all up and running, htop shows a 32-33% RAM usage as shown below: I've also installed netdata for a more granular monitoring, but then I get the following (after a restart and…
0
votes
1 answer

Nginx: unable to proxy some paths to Node.js server (between dwo docker containers)

So my current setup is the following: I am using docker (rootless install) and want to use Cryptpad (which uses Node.js) with Nginx as a reverse Proxy (disclaimer: I never worked with Nginx before). Cryptpad and Nginx both are running in separate…
Max.-F.
  • 101
0
votes
1 answer

Using Reverse Proxy Nginx in a docker container

So trying to setting Nginx as a reverse proxy using docker - I have three node js containers (one frontend and two backend services) the frontend service calls the two backend services. So I want nginx to redirect to the frontend (which is web…
0
votes
2 answers

PM2 - Process or Namespace not found when deploying with GitLab CI

When deploying from CI, as the user who started PM2, pm2 restart appname always results in [PM2][ERROR] Process or Namespace appname not found whoami/who on deployment shows the correct user. Tried switching users, as well as PM2's…
Klav
  • 101
  • 1
  • 2
0
votes
2 answers

How do I debug crashing application from inside docker and prevent it from terminating?

I need to debug an application that is crashing inside a docker, how do I achieve that the docker does not stop when the app crashes, allowing me to -it inside and try starting the app manually?
Qwerty
  • 105
  • 5
0
votes
0 answers

how to connect to mongodb server via ssh tunnel with Proxy Jump (ProxyCommand)

I have an ssh config file like this. I have a proxy jump to host1 from test2. Host host1 Hostname xxxxxx.us-east-1.elb.amazonaws.com Port 2222 User xxxx IdentityFile ~/.ssh/cert StrictHostKeyChecking no UserKnownHostsFile /dev/null …
0
votes
1 answer

Nginx reverse proxy to a node express fullstack app not working

I have a fullstack node express which serve static files and the api running on port 5000. my nginx config is : server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html…
0
votes
2 answers

How to Proxy Rest API endpoint on Apache HTTPd. React Frontend and NodeJS Rest Endpoints

Ive been trying to figure how to proxy my REST API endpoints in in Apache HTTPD. Apache HTTPD 2.4.6 (Centos) Front End - React Appliction (create-react-app) Node JS API Endpoints via port 9000. Im using a nodejs gateway called fast-gateway. Rest…
Tiesto
  • 1
  • 1
0
votes
1 answer

Now to find the lasted version of Node/Alpine Docker image

How do I find the lasted version of Node/Alpine Docker image? In a Dockerfile I borrowed, I have FROM node:13.12.0-alpine, but on DockerHub at https://hub.docker.com/_/node, I don't find that version anywhere. And it looks like a different notation…
BBaysinger
  • 125
  • 2
  • 10
0
votes
1 answer

Serving multiple nodejs sites with nginx which ports should I be starting apps on

I have multiple nodejs apps from different domains that I am serving from the same server with nginx. I am currently starting each app on a different port say 5000, 5001, 5002 ect. Then using nginx proxy_pass to serve them from the ssl port 443 like…
Steve K
  • 125
  • 1
  • 6
0
votes
1 answer

Slow external API request on NodeJS using Docker

I am trying to have a NodeJS server respond with data from an external API. Consider the index.js file: const express = require('express'); const axios = require('axios'); const app = express(); app.get('/api', async function (req, res) { url =…