Category "express"

Why is my CSS is not working for all my EJS loops?

I have a forEach loop that loops through my seeded Mongo database. Everything is working as it should, except one of my CSS functions that come from a jQuery fi

How to use User.findOne({ userID: searchUserID } correctly ??? (currently not getting return value)

I am currently trying to implement an update / put functionality in my node.js-project and having issues I have absolutely no clue, where that comes from. (also

expressjs repo documentation

I want to understand the internal working of Expressjs (just curious). Much of the thing are clear but I am not able to understand the chaining of routing and m

Set default header for every fetch() request

Is it possible, using the fetch API, to set default headers for every single request? What I want to do is set an Authorization header whenever there is a json

formidable - SyntaxError: Unexpected token - in JSON at position 0 when sending POST request

I am building the backend for creating blog posts for my web application while following a tutorial. The technologies I am using are MongoDB, express.js, formid

How to do something after sending a response in Express.js?

I'm developing a web app, which user could post a thread, 2 steps for this: one is to save the thread to thread collection, one is to save the threadID to user

What's the difference between req.isAuthenticated() and passport.authenticate() in passport?

I am a beginner in programmation and experimenting the authentication process through node.js, express and mongoDB. I have used passport, passport-local and pas

React Routing vs Express Routing

Been watching alot of tutorials and i see that there is express routing as well as react routing. Is the react routing for client and the node js routing for

REACT - Express : fetching data doesn't work on reload when user connected

I've deploy my first app using React with Nodejs/Express/MongoDB but I'm running through a bug I couldn't find any solution, so I'm coming here to find some hel

How can I print a PDF client side that was received from my server?

So I'm very new to generating PDFs from the server side as I have generally always created them from the client side. I decided to migrate to creating them str

Error: Cannot parse config file: '" + fullFilename + "': " + e3

I just want to set environment form development,staging and production in my project of express.js To set these environments I use module config https://www.npm

Express Login With Redirect Using Node.js

I'm trying to implement a basic login mechanism based on this answer: https://stackoverflow.com/a/8003291/5111904 In my backend I'm handling the login post req

Docker is not accepting proxy api server

i get the following error, when doing a docker-compose up. The app is running but cannot make any api post/get requests. The express server is using port 5000.

How to upload Files and Other fields with Request Body in Nestjs

I want to upload three fields like: Example Data: partner_id: 3638, review: [{'product_id': 155, 'order_sku_id': 155, 'review_title': 'Orange Review','rating':

Jest testing multiple test file port 3000 already in use

I'm creating a testing for my express app. The project has multiple test files. In each module the server instance is required at beforeEach() method and closed

Discord.js how to make suggest command?

What can I do in Discord.js to make suggest command? My actual code doesn't work, i have 2 types of suggestions: support server and bot. Here's my code: if (co

Allow multiple CORS domain in express js

How do I allow multiple domains for CORS in express in a simplified way. I have cors: { origin: "www.one.com"; } app.all('*', function(req,

Failed at the [email protected] start script

I am currently facing a deployment issue, can anyone help me with it? Repo: https://github.com/PradhumnaPancholi/Mail-it Error Msg: npm ERR! Failed at the serve

How to avoid spamming a NodeJS function? [closed]

So basicly I have a contact form in my Express application what sends me an email with SMTP. I want to do some checks in the server-side to av

Failed prop type: Invalid prop `errors` of type `string` supplied to `CreateProfile`, expected `object`

I am trying to create a profile for a user on login, after submitting the form I am getting the error as invalid props errors. As both my client and serv