Category "node.js"

express-session unable to retrieve session variable

I am using express-session to store my sessions persistently on a MongoDB database. The project worked perfectly in a development environment but for some reaso

Best way to structure deep time-series data in MongoDB?

I'm migrated from MySQL to MongoDB and looking to optimize the storage of my time-series data. Each item in my database has an array of values for multiple loca

Invalid Key Length in NodeJS, but Valid Key Length in C#

I'm converting Rijndael decryption from C# to NodeJS. The Key (or Passphrase) used is 13 characters long. The IV used is 17 characters long. Note: I have no con

Angular/Node.js, what's the ports when deployed?

I am currently building an app with Angular and NodeJS. On a development environment, it's quite easy, Angular is on port 4200 and I fetch response from Node.js

Why does my middleware produce an error when running get request by ID

I have just a simple API I am building for school. There is a collection of Books that are being accessed, displaying book by id, displaying all books, adding b

Using innerText without async in puppeteer

i was creating a certain code of puppeteer ,and i wanted to know if there's a way to get innertext or innerHtml or textcontent while using puppeteer without an

Why does My chrome Browser show the issue "Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform"?

My chrome browser suddenly shows an issue like that A page or script is accessing at least one of the navigators.UserAgent, navigator.appVersion, and navigator.

when i use uuid the code unexpected crash, and then works fine?

const express = require('express'); const { uuid } = require('uuidv4'); const app = express(); app.use(express.json()) const projects = []; app.post('/proj

How to create a file inside a folder?

I have fileUploadPath="d:/downloads"; and entry.name='155ce0e4-d763-4153-909a-407dc4e328d0/63690689-e183-46ae-abbe-bb4ba5507f1a_MULTI_0_3/output/res2/res2.fcs

NodeJS/React install xpi file instead of downloading it

Situation : 1.My nodeJS server serves a file like so : fileRouter.get('/firefox', async (req,res)=>{ const mime = 'application/x-xpinstall'

MQTT Connection Fails on Google Container OS

For my setup, I'm working with a third party MQTT VerneMQ broker hosted in AWS. I have been given username/password credentials to connect over secure MQTT (por

Hide Textbox with parameter name completely when the checkbox is disabled in UI

When I enable the checkbox, I've written a js function to enable the textbox to be adjustable; otherwise, it must be greyed out. Changes Made: When I enable the

Integrating Frontend Javascript with Backend Node.Js and mySQL

I have tried searching around, but could not really find a solution to my question. Either that or I am not really understanding something properly. I have a pa

Upload/Store multiple files with multer, i.e image and pdf with single request in nodejs

The following code works to upload a single image to upload an image and store its path in the database, now I can't find a way to upload an image and a pdf fil

I'm looking to get completed events counts but this query not working

My query let findEvents = await eventModel.aggregate([ { $match: { participants: { $eq: event.userId }, eventStatus: { $

Create JSON dynamically with dynamic keys and values in Express Js

I am fetching API into my Express server which has several JSON key value pairs in one array. For Example: [{ "quality": "best", "url": "https://someurlhere.e

Why has coming Application Error When I deploy code on Heroku? What is the reason of this Error?

Most of the case when I deploy in my nodejs server on heroku. I just faced this issues called Application Error. Now Question is why this error appear when we d

Ending node pipe on Transform or PassThrough

I have a stream pipe that reads, unzips, transforms, then I'd like to choose whether it moves onto a callback or writes and moves onto a callback. I hit on Pass

Which relation in MongoDB is better?

For my whole projects I have relationed my multiple collection as this. User model Name:string, email:string, password:string, vehicles:[{ "vehicleId", "vehi

ReferenceError: "_" is not defined

recipe = new Recipe(_.pick(req.body, ['name', 'tag', 'recipe'])); await recipe.save(); }); error: recipe = new Recipe(_.pick(req.body, ['name', 'tag