Skip to main content
0 votes
0 answers
19 views

How to add custom message on Zod tuple?

I want to return a custom message on a Zod tuple. I did not find any way to do that. Returned message: Array must contain at least 4 element(s) Code: z.tuple([ z.enum(), z.number(), z....
StackKaan's user avatar
0 votes
0 answers
13 views

How can I embed an Express session into a Next.js application using NextAuth for authentication?

I have a Next.js frontend and an Express backend. My backend handles user authentication, and I use a JWT token for authentication and store it in the Express session. I want to connect this flow with ...
tut's user avatar
  • 1
-3 votes
1 answer
38 views

Using routing with vanilla JS

I have an existing personal web app that is made from vanilla html and javascript (no web framework like react, vue, etc). It uses a parse server backend and provides dynamic (live query) updates. I ...
SimpleOne's user avatar
  • 1,086
-5 votes
0 answers
51 views

Having some issues with Google Calendar API integration

I'm making a Web app as part of a Capstone project. I decided to use the Google Calendar API with JavaScript, not realizing how complex Google's APIs are. Add that to the fact that I'm having to rush ...
AirenMarie's user avatar
0 votes
0 answers
24 views

How do I use a stored procedure in pg-mem for mock database postgres?

I want to mock a PostgresQL database for my unit tests, but I have several stored procedures in use. How do I implement it in the pg-mem package and the stored procedure has a database schema that is ...
lan code's user avatar
-1 votes
0 answers
31 views

i want to store my json data in mongodb but facing error of _id duplicate [closed]

I have JSON data in bulk almost 1000 documents in array and i want to insert this data in mognodb in a collection named material but when insert data it mongodb gives error: Failed to import with the ...
Sheraz Anwar's user avatar
0 votes
0 answers
52 views

Failed to execute 'json' on 'Response': Unexpected end of JSON input

(Why is 'Hello' always cut away from the text rendition? Anyways... Hello!) I'm struggling to find the cause of a 'Failed to execute 'json' on 'Response': Unexpected end of JSON input' error I'm ...
manawso's user avatar
-2 votes
0 answers
13 views

Meta API 400 Error on Last Call While Payload Works in Postman [closed]

`Title: createAds API 400 Error on Final Call in Loop, Works Fine in Postman Body: Hello, I'm encountering an issue when making the final API call in a loop to create ads using the Meta API. The final ...
user28757651's user avatar
-1 votes
2 answers
49 views

Node/Express application deployed on Render blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource

I've been debugging this for several days, trying different deployment variations. My simple test full-stack app behaves as follows: it works fine when the backend server runs locally + frontend runs ...
Nick's user avatar
  • 1
-4 votes
2 answers
37 views

Should I refetch data after DELETE operation in MERN stack to maintain data consistency? [closed]

I'm building a Todo application using the MERN stack (MongoDB, Express.js, React, Node.js), and I have a question about best practices for maintaining data consistency between frontend and backend ...
amira.patel's user avatar
-2 votes
0 answers
23 views

CSRF token problem in login post request in React.js and Express.js

my server.js code: const express = require("express"); const https = require("https"); const fs = require("fs"); const sql = require("mssql"); const bcrypt = ...
Ruslan Mammadzada's user avatar
0 votes
0 answers
20 views

Can I perform DELETE queries in a controller that works in a PUT request endpoint? [closed]

I might've not explained well the question above since I am pretty much a rookie working with Express js. I have the following Route in my "barbershopRoutes.js" file: barbershopRoutes.put(&...
sebastián lozano's user avatar
-1 votes
0 answers
15 views

How to write cookies via websocket in Express?

I'm trying to figure out how to write cookies via sockets in a shared session setup, but I'm unable to figure it out. I can edit the session and all, but that's it. I'm showing the setup I've made to ...
Drake's user avatar
  • 71
-2 votes
0 answers
14 views

aggregating files among microservices [closed]

I would like to make my own gateway written in typescript,express to receive from data from client and route all data to the internal microservice. note that the form includes media files (audio, ...
Mohammed Ehab's user avatar
0 votes
0 answers
17 views

Problem uploading image from express to s3

I want to upload an image to s3 but cant, eventhough a similar api like that can work normally. exports.createPost = async (req, res) => { const { user_id, title, caption } = req.body;// ...
Chinatsu's user avatar

15 30 50 per page
1
2 3 4 5
6380