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

CORS handling for an external host serving source that connects to local socketServer

tldr; The idea is for a server to host javascript that connects to the connected-device's socketServer. MyDevice's Browser > http://myserver.local > socket.io().connect('http://myDeviceIp:5000'); How best to achieve this and are there any safety…
0
votes
1 answer

How to configure AWS Application Load Balancer to point to multiple ports on the same server

I cannot get access to the second port that I want to have to. So, here are the listeners I have in my ALB: HTTP:80 - that does not have security policy or SSL cert but it is always redirecting to port 443 HTTPS:443 - which has an SSL Certificate…
0
votes
0 answers

Does Laravel tend to be much more slower than Node JS?

Does Laravel tend to be much more slower than Node JS? Or is it just me that doesn't know that Laravel have certain limiter or anything when runs in local machine (even though using production environment on the .env) Let see this basic landing page…
0
votes
1 answer

Node.js backend with simple frontend on same server

i have /var/www/html/ with index.html i have /var/www/ai_backend with server.js server.js is running on port 5000. so if i curl from this machine http://localhost:5000 i get response. but if i send post request from index.html to server_ip/api i'm…
0
votes
1 answer

What (low priority thread) is causing 100% CPU usage in my node alpine container?

I have a node alpine docker container (hosted on Azure) which periodically reaches 100% CPU usage. However, running the top or htop command shows no threads having high CPU usage. How do I find out what the cause is? It seams like the node process…
zapdev
  • 1
  • 1
0
votes
0 answers

How create automatic deployement and allow my customer dynamic create and access my app on subdomains?

I have created an nodejs app and i want my customer to be able to dynamic create an instance of my app with automatic deployement on subdomains for example ‘customer1.mydomain.com’. I know i can create vhost with node vhost package and nginx but i…
rach
  • 1
0
votes
1 answer

my nginx server was working perfectly fine and now shows a 502 error

I'm deploying my project, I had no problem until i decided to buy a domain for my digital ocean droplet i added the records from my namecheap domain to my droplet i was working on it then suddenly when i want access to myproject/api it's now showing…
0
votes
0 answers

Where to install yarn on a mastodon server [mastodon]

I am on my way to install mastodon. The installation guide says: be root sudo su - [do some other stuff] set up yarn: yarn set version classic This gives the following output: Resolving classic to a url... Downloading…
archygriswald
  • 143
  • 1
  • 11
0
votes
1 answer

Install with apt an old version of Node on Ubuntu 22.04

I'm getting crazy installing Node 16.x on Ubuntu. I use curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - And then sudo apt-get install -y nodejs But the version installed is the 18.x sudo apt list nodejs -a Return…
Roberto Pezzali
  • 141
  • 1
  • 1
  • 9
0
votes
0 answers

Localhost not working with vue.js

Im new using vue.js, so I just installed vue.cli and I tried localhost:8080 and it worked perfectly showing the vue welcome page. Then, 2 minutes later, localhost is not showing the page anymore (ERR_CONNECTION_REFUSED). I uninstalled vue and…
NdeNoob
  • 1
  • 2
0
votes
0 answers

Restarting PM2 when the latency of the API it's serving becomes high

I have an EC2 instance running which is housing a nodeJS/GraphQL based API application. The application is managed via PM2. I want to have a setup/configuration which can continuously ping one endpoint (actual API) on the server to keep monitoring…
beNerd
  • 117
  • 5
0
votes
0 answers

nodejs windows service shows as running but is not responding

I am using the node-windows module to serve my API as a service on a VM windows server. the service was running fine but after this weekend I had no response from the API and no errors in the app that is calling the API. When I checked the server…
Morgan Hayes
  • 101
  • 1
0
votes
0 answers

Running nodejs with next on WHM cpanel

im trying to deploy a next app to a cpanel hosting. I've followed the instructions given in cpanels documentation almost to the…
Breezer
  • 101
  • 4
0
votes
0 answers

Websockets failing without error message

I have a NginX server running two nodeJs applications, Let's call them A and B. Both applications are working correctly for websockets on my local machine, and https calls are working on the server for both applications, but websockets are only…
Michael
  • 105
  • 3
0
votes
0 answers

Nginx: Websocket on port 80 is not working

I have a simple NodeJs Websocket application running, the code for it is // Importing the required modules const WebSocketServer = require('ws'); // Creating a new websocket server const wss = new WebSocketServer.Server({ port: 8090 }) // Creating…
Bidyut
  • 121
  • 3