Questions tagged [nodejs-server]
405 questions
1
vote
2 answers
NodeJS: How to use Promise.all in order to execute a method once multiple requests are executed?
I am having a NodeJS project, where I have array of N parameters and I need to call an endpoint N times (once with each parameter). Then I need to listen once all the responses are returned and to execute a certain function only once all the results…

delux
- 1,694
- 10
- 33
- 64
1
vote
2 answers
How to redirect all paths except two if a condition is not met in Express
On my express server I'am tring to implement the following logic:
If the path is not /Login or /Register
And the request.session.authenticated is not true.
Redirect all request to /Login.
In other words , pseudocode :
function()
{
…

izzypt
- 170
- 2
- 16
1
vote
0 answers
How to get products grouped by category ID in TypeORM?
Hi, I'm trying to get a list of products grouped by category id, but I don't understand how to apply it.
These are my entities
@Entity()
export class Product {
@PrimaryGeneratedColumn()
id: number;
@Column()
name: string;
@Column()
…

SirRiT003
- 173
- 1
- 2
- 6
1
vote
0 answers
Node.JS Voice over IP Electron
I am fairly new to Node.JS, but I want to code a Voice Chat Program which uses the Electron Framework for the Client.
The Server shall be hosted on a Linux Computer. I want to connect with multiple Clients to this Server and talk and recieve audio…

peter12908
- 21
- 2
1
vote
0 answers
Pusher debug console is not showing my events in NodeJS, MongoDB
I am trying to implement a chat functionality using pusher and MongoDB.
I copied the appId, key, secret and cluster directly which were generated after creating my app from the pusher.
const pusher = new Pusher({
appId: "correctId which i got",
…
1
vote
2 answers
How to create dist for on node js application
I have created an application in node js with express framework. And need to deploy it on production server.
But don't want to deploy whole project on the server because security purpose. I want to create minified dist directory and deploy it on the…

Parth Agrawal
- 63
- 2
- 10
1
vote
0 answers
Code isn't throwing embed when MySQL returns
This code has something wrong with it: When I try to select based on Discord ID it doesn't return a result ([]) and I cannot fix it. This is the entire section of code, it is bound to be error filled but I am trying my best.
Please be patient with…

WillEridian
- 67
- 8
1
vote
0 answers
Node JS and Express - Possible EventEmitter memory leak detected
I have this error on my nodejs app (I'm using Nodejs + Express EJS)
Possible EventEmitter memory leak detected. 11 pipe listeners added to [Request]. Use emitter.setMaxListeners() to increase limit
I do this code process.setMaxListeners(0); btw I…

Gabrialoo
- 41
- 3
1
vote
1 answer
ECONNRESET error in Nodejs while calling API request
I'm using NodeJS in my application, I'm trying to call API service to get the token from the server. While I'm making any request from the NodeJS file I'm getting "ECONNRESET" error. I've tried with some API , which reflects the same error. Below is…

JeevaRekha
- 383
- 1
- 7
- 21
1
vote
0 answers
Node JS application service stopped running on system restart on Windows 10.How I can solve this issue?
I am using windows service for running my nodejs application on system restart. But my application is not running, whenever I checked in services it's showing blank in status bar and I have already selected Startup Type as Automatic. I also checked…

Mitesh Dube
- 41
- 4
1
vote
1 answer
How to Store an respone into a variable nodejs request module
I am trying to store the response of an http request made using nodejs by request module but the problem is I can't acsess it after the request is completed in more details we can say after the callback
How I can add it
Here is what I tried till…

Ishan Singhal
- 11
- 3
1
vote
2 answers
How do I start a server using nodejs?
I started learning nodejs and stopped at the lesson where the server is created, here is the code for this script:
var http = require('http'); // Import Node.js core module
var server = http.createServer(function (req, res) { //create web server
…

bazylevnik0
- 60
- 1
- 7
1
vote
1 answer
How to use the GET and POST method in the same endpoint using nodejs / express
Problem
Hello,
I would like to know how I can create an Endpoint that first uses the POST method to login and obtain the token and then use that Token and use it in a GET method to access some data.
As you will see in the code, I currently have the…

Chris Michael
- 319
- 6
- 18
1
vote
0 answers
How to receive webhooks from shoppy.gg in NodeJS?
I'm trying to make a system that receives a webhook from Shoppy.gg and if that webhook is the webhook that is "order:paid", it gets the email of the person who ordered and signs that person to the service i'm making.
The only problem i'm having is…

rblxploit
- 11
- 2
1
vote
2 answers
How to stream a media file from server to client side for example an mp3 audio file in my case in loopback 4 nodejs?
I have loopback 4 - nodejs in the backend and Ionic 4 in the frontend of my mobile application. I'm storing an mp3 file on server sid and I want to stream and play it on the client-side so basically audio streaming from loopback4.
So basically I'm…

Abrar Momin
- 19
- 1
- 6