Category "express"

Chrome browser can not read source map its from Express socket.io

My problem is : DevTools failed to load source map: Could not load content for chrome-extension://flijfnhifgdcbhglkneplegafminjnhn/content/socket.io.js.map: Sys

Error when set sameSite from strict or lax to none - HTTP only cookie - ExpressJS

I am running on a MERN stack project. Back-end runs on port 5000, and front-end runs on port 3000. After I've built to production, I pushed the server file to H

Connection failure error unable to handle in passport-windowsauth, how to handle it

I'm trying to connect ldaps server using passport-windowsauth. If I provide valid credential the connection is working fine. If the credential is not valid then

Displaying function values onto an already existing EJS template

I need to display a value from a JS file (indexRoutes.js) into an input box on an EJS template (calculator.ejs), I have included the script via a footer I have

Mongoose Schema for Groups (a number of users in one group)

One aspect of my website is that people can join groups according to a specific code provided to them, for example- when we play 'Kahoot' or 'Psych', we have to

insert into NedB boolean value without quotation marks

I have a NedB database which I'm trying to insert some new data into that I retrieve from HTML form, this is my function to insert new. addEntry(name,desc,ingre

Mongoose query always returns empty array

Im trying to make a greater than query but it always returns an empty array. const productSchema = require("./productsSchema"); const getProductsGreaterThan

require() of ES modules not supported

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: D:\...\node_modules\normalize-url\index.js [0] require() of ES modules is not supported. [0] require

How to send a image jpg/png file from react to express server

I am trying to send an object from react to express server using node.js this is my object: const formData = { location: location, cost: cost, email

How to add attribute to the result of mongoose query before res.status(200).send(result);

I am trying to build a CRUD API that query a mongodb. I want to add another attribute (temperature) to the query result before sending it back to the client. Pa

Mongoose.connect is not connecting to local db

I'm building a simple MERN blogging app with a local MongoDB. Everything was working fine until yesterday. I literally changed nothing at all and now I can't co

What is wrong with my code? I am trying to authenticate a user login with expressjs and mysql?

I am trying to figure out what part is wrong? I get this error: ERROR----- var pwdCompare = await bcrypt.compare(password, pwdCompare[0].password); TypeError: C

"Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0" ERROR -- NodeJS, MongoDB, React Application

I'm trying to fetch an array from my user database from my react app. The response I'm getting is an HTML file, but I'm not sure why it's not working as I have

Can I prefill Mobile number field in stripe express Onboarding?

Can I prefill the Mobile number field in stripe express Onboarding? Image This is my code, Here I am able to prefill all fields except phone number. I have tri

Reload not working with mern stack on heroku

I have deployed my mern stack to heroku with this code: import express from "express"; import path from "path"; const app = express(); const port = process.env

node and express - how to use fake data

It's been a while since I used node and express and I was sure that this was possible, but i'm having an issue of figuring it out now. I have a simple postgres

HTTP POST request test is not getting passed

I wrote some nodejs codes to be evaluated by a particular test file, candidate.test.js but surprisingly the test keeps failing. Below is the error I am getting:

eventlistener not functioning when post request is sent

I am trying to add a number indicator to my cart icon that will display the number of items added after the product has been saved to my database. <div class

GET json api data in datatable with axios and vuejs

I have a datatable and I want to pass the data according to the api that returns a json using findAll() from the sequelize.. But in console.log when I call the

Twilio send sms with nodejs not sending message

I am using twilio to send sms using nodejs, but sometimes it not working, not going to catch or not going to then, above it calling, client also created but cre