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

Configure nginx to serve query string parameter

We have one NextJs site, with next export we get one out folder which we want to serve from Nginx. In out/login there is one '[[...parameter]].html'. When we deploy site using pm2 it is working if we hit url…
Satish Lamak
  • 51
  • 1
  • 3
  • 7
0
votes
0 answers

NodeJS Unable to connect to Websocket Cross origin - "Err 1006"

I have a two webservers both running https with the same certificates, I have a main shard that the user connects to example.com, they retrieve some data and try to connect to an ip address on the 2nd shard via websocket. But no matter what I…
fmac
  • 1
  • 2
0
votes
0 answers

How to pass https requests to http in nginx

I have a self signed certificate, I deployed my front end react app on nginx which is served by using HTTPS but front end is making call to back-end spring-boot app over HTTP and when i check inspect element in browser it is showing…
Satish Lamak
  • 51
  • 1
  • 3
  • 7
0
votes
0 answers

content type is returned as text/html while the expected is application/json

some endpoints are returning the content type as text/html while the expected is application/json causing CORS error in the client side. when requesting from my localhost or from the server's IP address, the data is returned as expected. which means…
0
votes
1 answer

Error connection refused MERN APP on EC2

I have MERN app on ec2 i am getting an error ERR connection refused when connecting localhost:8080/api/auth/sign with node api. Cannot make post calls. What should I do?
0
votes
1 answer

Sharing a Let's Encrypt certificate with a node websocket connection on the same domain? Possible? Advisable?

Is it possible / advisable to register and renew a Let's Encrypt certificate through Nginx for https, and share that same certificate on a websocket connection (wss://) on the same domain? The websocket server is being ran off of node.js (Colyseus…
Jon
  • 103
  • 3
0
votes
1 answer

My Node.js droplet can't connect to DigitalOcean Managed redis

I have a Parse Server (which is a Node.js server basically) and I'm trying to connect to a redis database, which is hosted on DigitalOcean Managed Databases. Both servers are on the same VPC network and the droplet is added to redis's accepted…
Sotiris Kaniras
  • 198
  • 2
  • 10
0
votes
1 answer

Why doesn’t my DigitalOcean load balancer forward traffic to Parse Servers?

Today I created a load balancer and assigned to it 3 droplets (all 3 host parse servers), but it doesn't transfer the traffic to them. It doesn’t even pass the health checks! All 3 of my parse servers, have 22 and 1337 as their only open inbound…
0
votes
1 answer

Apache2 server getting so many unusal requests again and again

I am trying to configure the WordPress and NodeJS website together and I am using an apache2 server and ubuntu(20.04) virtual machine. I configured both applications successfully on my machine but after some time, I start getting unusual site down…
0
votes
0 answers

NodeJS can't find python: gyp ERR! find Python

I'm trying to run a script but nodejs can't find python for some reason. I have tried reinstalling python, reinstalling nodejs, reinstalling my OS, running (and rebooting afterwards): export PYTHON="$(which python)", export PYTHON="$(which python3)"…
tired
  • 1
  • 1
  • 2
0
votes
0 answers

react.js app with nginx gives 404 or refresh

I have a backend node.js application(system directory) and a frontend react application(admin directory). I use nginx as the webserver. I can load my frontend well. But when I refresh, it gives 404. I have looked in the nginx directives, but I'm not…
user1641443
  • 103
  • 1
  • 4
0
votes
0 answers

NodeJs app working when started using npm start, but not with PM2

Very new to server stuff, sorry if this may be a noob question. Problem I am trying to run React and Node/express on a server. React does work and when I start my node app via npm start the server actually works too, meaning: Opening the website on…
Tommy
  • 101
  • 1
  • 2
0
votes
1 answer

Safari cannot open my website

After two years of running a website (https://emocoes.org), today for the first time it does not open on Safari. It opens on other browsers (Firefox, Chrome, Chromium, Opera), but on Safari I see: Safari Can't Open the Page Safari can't open the…
miguelmorin
  • 249
  • 1
  • 5
  • 13
0
votes
1 answer

How do I host Node.js and WordPress sites on the same domain name with a different server?

I would like to host 2 different applications on a different server. For eg www.example.com redirected the NodeJS application - Server A & www.example.com/blog redirected the WordPress application - Server B both applications are hosted in a…
0
votes
0 answers

NodeJS stops listening on port 443

We are having a big problem with nodejs intermittently not listening on port 443. Development claims that this is because node cannot connect to the Mongo database. However, when I get an alert the port is not listening, I can still see there are…