Questions tagged [nodejs-server]
405 questions
1
vote
1 answer
Nginx Reverse Proxy won't resolve to SSL
I'm kinda new with NGINX, so still learning how to deploy it correctly. At this moment I'm running into a problem.
My project exists of a frontend in HTML (JS etc), and an API in nodeJS running on port 5000.
I've created my Nginx file and it kinda…

Wouter
- 41
- 6
1
vote
0 answers
Should all body parameters of any endpoint be declared as optional types?
When I send body data to an endpoint on my Node/Express server, there is no guarantee that the request actually contains all the required fields. Is it, therefore, correct to always declare all body properties as optional types in TypeScript like I…

Florian Walther
- 6,237
- 5
- 46
- 104
1
vote
1 answer
How can I retrieve the Lotus Note user job title with Node.js?
I have tried to use the following code to retrieve the Lotus user detail by Node.js.
let ActiveDirectory = require('activedirectory');
let config = {
attributes:{user: ["*"]},
url: 'ldap://mylotusdominoserver',
baseDN: 'OU=myOU,O=myOrg',…

The KNVB
- 3,588
- 3
- 29
- 54
1
vote
1 answer
node js automatically change port
I am using node Js, and I want to know if there is a way to make my nodeJs automatically change the PORT if the default one has been used.
for exemple: the default port for my server to run on is 3000. But if that port is already in use, it should…

Akrem Gomri
- 23
- 4
1
vote
0 answers
Although password is correct but Nodemailer error - Error: Invalid login: 535 Incorrect authentication data
Getting this error instead of using current email and password
const nodemailer = require('nodemailer');
// async..await is not allowed in global scope, must use a wrapper
async function sendEmail(sendTo, subject, text, html) {
try {
const…

MD SHAYON
- 7,001
- 45
- 38
1
vote
3 answers
Node.JS Express routing not working as it should work
File structure:
In /server/routes/index.js
const Router = require('express');
const router = Router();
const deviceRouter = require('./deviceRouter');
const brandRouter = require('./brandRouter');
const typeRouter = require('./typeRouter');
const…

yellowdopamine
- 21
- 4
1
vote
1 answer
Redis Nodejs Pub/Sub is not working as expected for different selected db
I am using Nodejs and "redis" for a pub sub to hear for expired Events.
In default its working just fine but when I switch to a different selected db it just does not get subscribe but I am seeing the setex working properly
Here is my code:-
const…

meaow meaow
- 11
- 4
1
vote
0 answers
Question about token delete form cookies node.js React.js
I'm making Authentication system using jwt with httpOnly cookies in node.js and React.js.
Question is- How should i handle if someone explicitly delete cookie(contain accesstoken) by going to inspect> application >cookies tab in browser?
In my case…

Sharanjeet Singh
- 89
- 7
1
vote
0 answers
How to add multiple joins in the same query for pool.query Nodejs connection?
I'm building an Accounting Web Project using Nodejs and Express and I have to connect three tables from my database: parametro, tipoparametro and clasificacion.
My original query allows two tables to connect with the following code:
const parametro…

Marlon Miller
- 13
- 2
1
vote
1 answer
Multer gives unexpetcted end of form error
The file is being send to the nodejs server, but the upload.single gives an unexpected end of form error. How do i fix this?
const upload = multer({ dest: "../../uploaded_images" });
router.patch("/profile", upload.single("profileImage"), (req,…

warre
- 33
- 1
- 8
1
vote
0 answers
Sending sms with textLocal Api in nodejs
I am getting the response:
response { errors: [ { code: 80, message: 'Invalid template' } ], status: 'failure' }
Template status is Active and
Template I have registered with my Textlocal account:
Welcome to %%|applicationName^{"inputtype" :…

aniketrandhave
- 11
- 2
1
vote
1 answer
In React 18, when I am sending data to nodejs server, it is sending two request and receiving two response from server
This is the front-end code which is used for sending access token to server site.
useEffect(() => {
const getProducts = async () => {
try {
const url = `http://localhost:5000/product?email=${user.email}`
…

Mehedy Hasan Linkon
- 13
- 2
1
vote
0 answers
NodeJS FTP not throwing error when trying to delete non-existent file
I am working with ftp-npm and I am currently facing a weird bug...
I have a method called refreshStore that contains this part of code :
c.delete('/pathToMyFileOnFTPServer', function(err) {
console.log('117');
if (err) throw…

Anis
- 21
- 2
1
vote
1 answer
Updating a specific value in row with conditions nodejs google sheet
I've been trying to update an existing row with the same name, email, etc.. my problem is that I can't figure out how to add a number in the second trial WPM for the same user.
to be more clear, the user submits a form and start the operation in the…

Bewenben
- 13
- 4
1
vote
1 answer
could not pull the data if it is null in mongo and node
var myquery = { code: code, display_name: display_name,"main_page.sliders.web.id":wid };
var newvalues = {
$pull: {
"main_page.sliders.web": {"id":wid },
"main_page.sliders.mobile": {id: mid }
},
}
…

Krishna
- 53
- 5