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

Program installed for one user cannot be accessed from other user even full path is provided

I have all the npm pacakages installed for a particular user (i.e) not root (/home/otheruser/*) I am using monit to see whether to check the program is running. In this case its pm2, which is in /home/otheruser/.nvm/versions/node/v5.2.0/bin/pm2 I…
The Keeper
  • 141
  • 5
0
votes
0 answers

Why might SELinux issue a Permission Denied error when accessing an upstream Node.js server's default routes, but not static files like image files?

Environment: Nginx reverse proxy serving static resources and using proxy_pass to serve resources from 2 separate Node.js upstream server instances. Simplified example nginx.conf: server { server_name example.com; location ~* \.(jpg)$ {} …
0
votes
1 answer

curl nginx as proxy server with "-i" works but with "-I" 404

i'm trying to make nginx as proxy_server to nodejs app on port 3000 for testing purpose with compression, when doing this: curl -I -H 'Accept-Encoding: gzip, deflate' http://localhost/json i go this: and when curl it with -i with body shown curl…
0
votes
0 answers

Multiple Web Application - Cache Layer Design

I have multiple client e-commerce web applications running on a single VM, each web application is a node.js express application. The express web application communicates with the back end via API's to retrieve the content for the pages and the list…
Tam2
  • 111
0
votes
1 answer

How do i add nodejs runtime layer layer to my Python Lambda on AWS?

wscat test In my Python lambda I want to use wscat which requires node: $ /opt/wscat-layer/bin/wscat /usr/bin/env: node: No such file or directory Question: How do I add nodejs runtime to my Python lambda so i can execute wscat?
Alex B
  • 123
  • 5
0
votes
0 answers

Angular post request refused, but nodejs post request works

I have an express app which listening on port 5000 like this: app.listen(5000, "0.0.0.0, ()=>'Server started on' + 'port ' + 5000). When I try to send a post request by node script using axios or curl its response me…
0
votes
1 answer

Unbearably slow redis connection when using openvpn

I have an OpenVPN config file like the following: client proto udp explicit-exit-notify remote SOME_REMOTE_SERVER 1194 dev tun resolv-retry infinite nobind persist-key persist-tun remote-cert-tls server verify-x509-name server_mccDtH70s3fYYV1g…
0
votes
0 answers

How to Serve Nodejs Application from sub directory with PHP Application on root?

I have php running in root directory and wants to run a microservice built with nodejs in subdirectory. I did some configurations but the css/js/images are showing 404 not found. Below the nginx configuration. server { listen 80 default_server; …
gurupal singh
  • 103
  • 1
  • 3
0
votes
1 answer

Cannot setup a reverse proxy with Nginx

I'm trying to display my NodeJS application when the user type a specific domain. I already pointed the domain on the server, then I've installed Nginx and I have created a configuration file into: /etc/nginx/conf.d/myapp.conf this have the…
sfarzoso
  • 103
  • 4
0
votes
0 answers

Are requests with no headers a sign of hacking?

I run a NodeJS web application with packages up to date and secured with a strong password and RSA for ssh. The application runs on two domains. I check the request headers to get the domain and found some weird requests that had no…
miguelmorin
  • 249
  • 1
  • 5
  • 13
0
votes
1 answer

Error in Node.js / Ubuntu 20 server configuration: 111 Connection refused

I get these three lines of errors when I refresh my page: 2020/10/07 16:38:55 [error] 315270#315270: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 66.249.66.221, server: akadjg.com, request: "GET /robots.txt…
DJG
  • 101
  • 1
0
votes
0 answers

Client sends "FIN, ACK" instead of "Client Hello" | Connection closed during SSL handshake | Haproxy

I am trying to establish SSL connection between the .NET WebSocket Client and my server by calling "wss://domain.xyz". Haproxy is handling the SSL handshake and once that is done it connect to a NodeJs server running on the same server. Currently, I…
Panays
  • 1
  • 2
0
votes
1 answer

Can this inbound & outbound bandwidth of my server cause issues?

I have a social app where users do the usual stuff of other social apps; upload multiple text and photo posts every hour, like & comment (a notification is created for each action), view custom/native ads, block users (and their content) etc. The…
Sotiris Kaniras
  • 198
  • 2
  • 10
0
votes
0 answers

EC2 Instance with node pm2 keeps breaking my instances ssh

Update:ok weird so my instance public dns seemed to change? is that possible, now I can ssh in after changing to the new one. still can't ssh in from the browserbased connection tho. I have a ec2 t2.micro instance of ubuntu 18, that keeps…
0
votes
0 answers

502 Bad Gateway when uploading files (NGINX and NodeJS)

I am developing an app where the user can upload files. While the backend call seems to work fine, the call when uploading files returns a 502 Bad Gateway message. The files actually get uploaded but the error message comes up. I think it has…
lnband
  • 1
  • 1