Questions tagged as ['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.
Score: 0
haemse avatar
MS SQL-Server 2014 - Is it possible to trigger an Event/Script, when a certain Query comes along?
bd flag

I'd like to have the possibility to accomplish a certain routine (fi. trigger a external node script or any kind of script/method whatever), when certain queries come along in MS SQL Server 2014.

Is there a way to accomplish that? (worst case - monitoring log events?)

Im used to SQL but a beginner on MS SQL Server

Score: 0
High availability with round robin - rsync and DB replication or a cluster?
au flag
knm

I have one machine (centos7) with Apache, PHP, MariaDB and Nginx, Nodejs, MongoDB installed and being used by many different domains.

I'd like to create a working mirror and can't decide between 2 options:

  1. rsync static websites, server and config files + mariadb and mongodb replications
  2. cluster made of 2 machines with some proxmox or other free technology (topic new for me)

I want both of them to ser ...

Score: 0
Álvaro avatar
Getting 502 from Nginx when processing node app
hu flag

I am running an app with react and node that uploads csv files via react, node then converts them to json, processes the data and finally it outputs an excel file using npm exceljs, the whole thing takes a little time on my local environment but it works well.

But when I put it on production I get a 502 error when it's processing the excel file.

There is no much information other than 502, on the ...

Score: 0
yash avatar
Fluentd unable to parse Json logs generated from node pm2 server
us flag

I am using fluentd, Elasticsearch and Grafana stack for logging and monitoring setup. I am tailing the logs(in JSON format) coming from NodeJS container/pod deployed in EKS cluster and dumping into Elasticsearch.

Problem The log format coming in stdout from node(deployed using pm2 web server) is not accurate json for example:

10:37:01 0|server | {"timestamp":"*","level":"*","label":"*","user":"*","messag ...
Score: 1
MMMWeirdo avatar
iOS saying ssl is invalid from letsencrypt
co flag

I’m using letsencrypt for a few sub domains one of which is chat.mydomain.com which is setup as an alias of the main domain in Apache because it uses a socket on specific port and doesn’t require a doc root.

The chat server is written in node, it runs in the background using forever and the chat code uses a socket on port 3002.

Everything works fine except on my iPhone. If I’m on the computer  ...

Score: 0
Jorge Mauricio avatar
How to deploy a server side rendering (SSR) react application (bundled by webpack) on windows server 2016 / IIS
cn flag

Just a heads up: This is the first time I try to deploy a react application on a custom built Windows server, but I’ve managed to do it successfully on Heroku and Linux (PM2), so I know that the application architecture is suppose to work correctly.

The scenario:

I’ve built a Windows Server 2016 / 64 bits hosting server to host multiple websites. I’ve used VPS Contabo to do so. I’ve tested all  ...

Score: 0
Website loads too long if more than 60 people are online (Apache nodejs)
ng flag

If you visit https://tapwar.io, it loads for so long (well, by the time I wrote this post) and it only happens when more than 60 people are connected.

Here are the further details on the app: It is a nodejs app listening on port 5000, I used Apache CentOS 7. The server is working properly if there are less traffic, I used proxy.conf like so:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [N ...
Score: 1
Apache reverse proxy to Node - Connection refused: AH00957
in flag

I am trying to get a brand new cloud based server working with a default version of 20.04 server ubuntu working with apache and node. The node server appears to be running without issues reporting 4006 port is open. However I believe my apache config is not. The request will hang for a very very long time. No errors are displayed in the node terminal.

I have confirmed that everything is correct o ...

Score: 0
systemdebt avatar
npm script not able to use executables from node_modules.bin directory
cn flag

My npm script in package.json looks like this:

"build": "$(npm bin)/react-scripts build",

OR

"build": "react-scripts build",

It throws the following error:

Error: Cannot find module '../scripts/build'
Require stack:
- /codebuild/output/src573716697/src/node_modules/.bin/react-scripts
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.resolve (interna ...
Score: 0
Dario Corno avatar
cURL suddenly gives Connection Refused to an Ubuntu Server
us flag

I have a custom wordpress "client" plugin that makes a cURL call to a Node app on an Ubuntu server.

The call works perfectly from every WP installation, except for one where everything worked fine until yesterday then the following cURL call suddenly started to return a

Failed to connect to x.x.x.x port 3344 after 1040 ms: Connection refused.

    $curl = curl_init();

    curl_setopt_array($curl, array(
 ...
Score: 0
Leon A avatar
How to dynamically add CORS sites to Google Cloud App Engine Node API
cn flag

I am new to API deployment.

I have a Node Express API that has CORS enabled in the root app.js, for the API and a socket.io implementation:

var app = express();
app.use(cors({
   origin : ["http://localhost:8080", "http://localhost:8081"],
   credentials: true
}))

and

const httpServer = createServer(app);
const io = new Server(httpServer, { 
    cors: {
        origin: ["http://localhost:8080", "htt ...
Score: 0
ch3t avatar
nginx returning 405 method not allowed for node apis with localized angular folders
uz flag

I did changes in ngnix file to make it work for localized angular dist folder with multiple languages. client side application working properly with url routing etc but node apis for authentication are returning "405 method not allowed" error. any help would be appreciated. Solutions I have tried,

error_page 405 =200 $uri; -- it gives 200 in status code with empty response tried setting up orgin  ...

Score: 0
Scalar Mikeman avatar
Docker containers front-end and back-end unable to communicate error "strict-origin-when-cross-origin"
in flag

I'm trying to do the https://devopswithdocker.com/ course, but I am not too familiar with node.js and react. I clone the repository here and make a Dockerfile in example-backend and example-front end. My Dockerfiles look like this:

example-frontend/Dockerfile

FROM node:14
 
WORKDIR /usr/src/app
 
COPY . .
 
ENV REACT_APP_BACKEND_URL=http://127.0.0.1:8080/
 
RUN npm install
 
RUN npm run build
 
RUN ...
Score: 0
Nginx rewrite with proxypass
pk flag

I have an Nginx running in the front of a node js server (next.js). I'm trying to write my Nginx config in order to achieve this behavior, I want to add the hostname as the first part in the path before proxy_pass to node js.

for example, the client will write a.com/ or a.com/product/... or a.com/**.
my nextjs application except for something like http://a.com/[:domainname]/.... while the domain name i ...

Score: 1
miguelmorin avatar
User agents not trusting web server due to Let's Encrypt DST Root CA X3 root certificate expiration
jp flag

I handle a NodeJS server with an SSL certificate issued by Let's Encrypt. It works on some clients (Safari and Firefox on my macOS) and not others (curl on my macOS, Safari on iOS). The notice on iOS is:

Not trusted

Expired 30/09/21 07:01:15

The notice on curl is:

curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL ...
Score: 0
jessieloo avatar
Credentials manager for LocalService - Azure Server to Local Server with Node.js
us flag

A colleague is having issues getting a node web service hosted on azure to be able to access a file server on premise. There must be a vpn tunnel setup b/c if you remote onto the azure server using our azure admin login, we can browse to the files without any issue and have told it to remember the connection which adds it to the Credentials Manager in Windows Control Panel. In my experience, in order  ...

Score: 0
Lalit Fauzdar avatar
Access Node-TS app running in Windows server 2019 from any computer
cn flag

I've a Node-TS based Opensource ERP Gauzy deployed and running in a Windows server 2019 and I want to allow access and connect a domain to this app so that it can be accessed from anywhere by any number of users. Reason for windows server is this app just doesn't work with HTTPS in Ubuntu, wasted more than two weeks in that.

The problem is I've not found any link/resource mentioning the same.

Because the  ...

Score: 0
Rouissi Iheb avatar
How to run a php application on a subdomain , and another nodejs application on another subdomain on the same nginx server?
ng flag

I hav a domain exemple.com , i need to run a php application on php.exemple.com and nodejs application on nodejs.exemple.com using nginx on ubuntu 20.

the nodejs application is already running on reverse proxy ,so i need to add the php app. What should i install for php ?

I did work on php for a while but that was on windows so trying to install php-fpm on the production server looks dangerous if you do ...

Score: 0
yucelm avatar
Port 80 vs 3000? How does it resolve?
cn flag

It might be a simple question but I am trying to wrap my head around server mechanics. If I have a node app o server listening to port 3000 and yet browsers by default use port 80 for http requests, how dow my request resolve on the server?

Again, it might be such simple question for some of you but I would appreciate a reply.

Thanks.

Score: 0
0diseus avatar
Issues with node - Error: Cannot find module 'firebase-functions'
cn flag

One of our devs is trying to run a script with node, but it gives this error output:

internal/modules/cjs/loader.js:818
 throw err;
 ^

Error: Cannot find module 'firebase-functions'
Require stack: ...

Since this dev is new to node, and so do i, what exactly can we do?

We have node 12 running

Score: 0
How could a request be dropped when sending a request to NodeJS?
in flag

I have an AWS ALB that load balances requests round-robin to four servers.

Each server uses pm2 to round-robin those requests to six CPUs.

NodeJS processes (react NextJS) are running on each of those six CPUs, served by Express.js. One of the first things they do is log the incoming request. (They are not fronted by a web server like apache or nginx, it goes straight to Express.js.)

Usually every singl ...

Score: 0
neuroine avatar
Passenger Apache - Forbidden You don't have permission to access this resource
vu flag

I'm stuck with Apache with Passenger configuration. I spent a few days looking for a solution. I follow this instructions. I'm getting this message in the browser:

Forbidden

You don't have permission to access this resource.

httpd.conf

# Use /usr/bin/node by default.
PassengerNodejs /usr/bin/node

<VirtualHost *:80>

    ServerName example.com

    RewriteEngine On 
    RewriteCond %{HTTPS} off
  ...
Score: 0
Installing Node on a server with no internet, with ansible/nvm?
cn flag

I have a little puzzle.

I'm trying to get Ansible to deploy NodeJS to a server(s) that do not have access to download Node from the official website. Really, no access to the web (And enabling isn't an option). But I am able to send stuff to the servers from a trusted box.

I'd like to get the node deployment and versioning codified, hence trying to use Ansible with NVM. But NVM doesn't seem to have  ...

Score: 0
Tyler Pashigian avatar
Google App Engine Start program Failed
ke flag

I have a very basic NodeJS application hosted on Google App Engine that executes an async function on 15 second intervals. The deployment is successful and the app starts and runs fine, but stops after about 30 minutes with the following error logs. This runs fine locally, though.

Quitting on terminated signal

Start program failed: user application failed with exit code -1 (refer to stdout/stderr ...

Score: 0
kshetline avatar
How do I get a graceful shutdown of Node.js running on Apache/CentOS/Plesk?
br flag

Hopefully this question has an answer that's generic to Apache and Node.js, and not specific to Plesk ('cause I know how you feel about Plesk-specific questions!).

I recently decided to add some text message notifications to a Node.js server app, for when a particular update was discovered. While I was at it, I figured it would be a good idea to add a server start-up and shutdown notifications to ...

Score: 0
mawerick_1 avatar
Nginx return 500 Internal Server Error
es flag

Last night I was trying to upload photo on my website and I get error enter image description here

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

enter image description here

I try many option and also increase memory on Nginx.

So is there anyone who can tell me what to problem can be ?

Score: 0
mahen3d avatar
how to fix the npm install fails with 'An unknown git error occurred' in one folder but works in a another folder
cn flag

My Server runs on Centos 8 and I installed nodejs latest (v14.17.5) and NPM (v7.21.0), both dont have a .git folder in there.

I have a very very strange issue, If I goto folder example1.com, and run npm install I get the below error,

[root@www centos]# cd /var/www/example1.com/httpdocs/
[root@www chat]#  npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created wit ...
Score: 0
Sterina Pen avatar
pm2 Multiple God Daemons and node process Spawning
ng flag

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 processes for which there should be only one God Daemon. I have installed pm2 globally and it is running by user appuser. Can anyone tell me how can I ...

Score: 0
soltex avatar
AWS Load Balancer 502 Bad Gateway
sh flag

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 never reaches the server.

I had a similar problem before, and I had to add keepAliveTimeout and headersTimeout to the node configuration.

I have a few  ...

Score: 0
Raviteja Sutrave avatar
Ngnix + django +nodejs : Uncaught SyntaxError: Unexpected token '<'
in flag

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 js files. I am getting the below error in console,(I suspect it is because browser is not able to find JavaScript file) both of my js files present under pub ...