All Questions
77,299 questions
-1
votes
1
answer
62
views
How to handle async/await inside Express middleware without blocking the request-response cycle? [closed]
I'm working on a Node.js project with Express and using async/await inside middleware to validate an auth token with an external API.
Here's my middleware:
const authMiddleware = async (req, res, next)...
-3
votes
0
answers
32
views
Node.js/tsx server fails to render React component with 'Objects are not valid as a React child' error [closed]
I'm running a Node.js/Express server with tsx and I'm trying to render a React email template to an HTML string so I can send it with Resend.
The process consistently fails with a React error, even ...
-2
votes
0
answers
27
views
CORS Missing Allow Origin in expressjs [closed]
In my NextJs/express, I am trying to make a request to my API but always receive
CORS Missing Allow Origin
I tried to create a minimal express app where I added:
app.use(cors())
everything worked ...
-1
votes
0
answers
31
views
Why does my JWT-based session not auto-expire after 2 hours in a MERN HRMS project? [closed]
I'm building an HRMS dashboard using the MERN stack as part of a hiring test. I'm using JWT for authentication. I want the user to be automatically logged out after 2 hours.
Here’s what I did in the ...
-7
votes
0
answers
55
views
Some issue with using MariaDB in Node.js [closed]
I want to store some test data in MariaDB using JavaScript, Node.js, and Express.js.
A button is on an HTML page, and when it is clicked, it is going to store these data fetched from a simple ...
1
vote
1
answer
46
views
How can I retain Express Session + Passport Session in Node.js?
I am trying to integrate Steam accounts into my project, by linking them through passport-steam module.
My app is also using express-session, in order to authenticate signed in users.
const session = ...
-1
votes
0
answers
36
views
Peer dependency conflict [closed]
I am doing FullstackOpen course by Uni of Helsinki, part 4. We were trying to eliminate try catch block with the package express-async-errors, but this package after installed, has peer dependency ...
0
votes
0
answers
24
views
Express.js server running passport-google-oauth20 logs in when accessed via browser, but not inside my webapp
this is my first react/js web app project and I'm completely stuck.
I have an express server using passport-google-auth20. From accessing the api routes via Chrome, I am able to authenticate and ...
0
votes
1
answer
59
views
Save a user in an array in a POST request
I'm new to back-end development. I'm doing the FCC back-end challenge, and I'm having a problem because they're asking me to return an array in a GET request that contains all the existing users. But ...
0
votes
1
answer
43
views
Cookie gets deleted after page refresh
Issue - cookie is getting deleted on localhost when page is refresh but cookie was successfully set from backend (Express).
I am using the Express CORS middleware to access the API from different port....
1
vote
0
answers
31
views
electron & prisma & nodejs not working in production windows build [closed]
Please, I need your help. I'm working on a project that uses node+ express + prisma & sqlite as database. I also create a build of my react + vite frontend that i served through express root ...
0
votes
0
answers
50
views
How to use Replicate Trained Model after Training is finished?
I am developing an AI Headshot SaaS and I am having a bit of trouble getting the Replicate models to work correctly and it's kind of confusing me. Everything works up to Replicate Training Model but I ...
0
votes
0
answers
59
views
Double refresh of the editor page when loading the image
Description:
My teammate and I are working on a project using React + Express.js. The project implements an admin panel where we can edit data about team members of the developed project. We use ...
0
votes
0
answers
51
views
Node.js http-proxy-middleware: Proxy request hangs with 408 timeout, onProxyReq not triggered
I'm building an API Gateway using Node.js, Express, and http-proxy-middleware. All incoming requests are forwarded to different services based on dynamic routing logic.
I'm encountering a 408 Request ...
0
votes
1
answer
25
views
PayPal Checkout with GooglePay button in advanced integration - dynamic total price does not work
I used this integration for placing GooglePay button in checkout: https://github.com/paypal-examples/googlepay/tree/main/advanced-integration
It works well. I also change "totalPrice" ...