95,730
questions
0
votes
0
answers
14
views
Node.js first Api call succeeds, second Hostname/IP does not match certificate's altnames
I've seen many posts about this, and how this means that you need to fix your certs.
I'm a little confused as to how these certs work in my context. I have 2 Api calls on my React app to an node.js ...
1
vote
0
answers
16
views
Axios returns 403 on API call but okhttp3 (java) works fine
I know that this question might be already answered, but I checked related questions, tried the solutions but could not get it to work.
Here is the issue:
Goal
Get JSON response from the following API:...
0
votes
0
answers
24
views
how not to write routes for express node js application
I'm working on a Node.js/Express application, and as the project grows, I'm starting to run into issues with managing and registering routes in a centralized app.js file. Here's how I've structured my ...
-1
votes
0
answers
9
views
Express TS: Error with absolute path (e.g. '@/') on vercel
Vercel logs: Cannot find module '@/constants'
I've encountered a problem with the use of ‘@/’ instead of '../../src/*' when i deployed my app on vercel.
This is my package.json script:
"scripts&...
0
votes
0
answers
10
views
WebSocket notifications not working with deployed Render URL but working locally
I am experiencing issues with WebSocket in my code. When using the deployed URL from Render (https://polis-backend-test.onrender.com), I do not receive notifications on the frontend. However, when ...
0
votes
0
answers
12
views
Accesing express server for auth2 return cors error
Im on production trying to use google auth 2.0 with passport on my express js backend.
origin: function(origin, callback) {
if (!origin || allowedOrigins.includes(origin)) {
callback(null, origin);...
-1
votes
1
answer
33
views
How to handle authentication in a backend using Firebase Admin SDK and Express with TypeScript?
I am implementing sign-in logic for my app's backend, built using Express with TypeScript, and leveraging the Firebase Admin SDK. However, after exploring the methods provided by the auth instance and ...
0
votes
0
answers
20
views
Can't connect to MongoDB with mongoose after installing package
I setup a MongoDB cluster using MongoDB atlas. After this I created an express app by running the npm init -y.
I then installed some packages and set the scripts. Here is my package.json:
{
"...
0
votes
0
answers
14
views
Modifying response body from target proxy through http-proxy-middleware
I am trying to modify HTML body response of proxied target url, but my res.send method is not executing because onProxyRes function not waiting the proxyRes.on('end', () => { event.
const express = ...
-1
votes
0
answers
24
views
Problems with deployment
there is a problem with me, i made a backend project using node js express and mongodb
when i try to deploy it using render i followed the steps and i choosed the free plan when i clicked Create web ...
-9
votes
0
answers
36
views
A good title helps your question get the attention it deserves. What goes into a good title? [closed]
Explanation
The error "Failed to load resource: the server responded with a status of 404 ()" means that your browser was unable to find the requested resource on the server.
Here's a ...
0
votes
0
answers
13
views
the good way to implement role and permission in express rest api using prisma
I need kind of expert opinion to implement Roles and Permission in Express js. I'm planning to develop Restful Api using Express js but didn't get sufficient information or uh the flow logic to ...
0
votes
0
answers
20
views
Problem building query sequelize-typescript
I am currently facing an issue when creating a query with sequelize-typescript. The problem arises when trying to fetch records from a many-to-many relationship. Here is the SQL query I am trying to ...
0
votes
0
answers
11
views
Installing module is not fixing Error: Cannot find module 'qs'
I have this error
, I ran npm install qs and it still didn't fix it. As well as deleted and reinstalled package.json dependencies. No luck with that either. The error started randomly when i ...
1
vote
0
answers
20
views
redis connection Error: getaddrinfo ENOTFOUND redis on nodeJs server
I'm using nodeJs as a server and while trying to init redist connection i got this error:
Error: getaddrinfo ENOTFOUND redis 2024-11-17 13:32:35 at GetAddrInfoReqWrap.onlookup [as oncomplete] (...
0
votes
1
answer
34
views
Create top-level domain cookie inside subdomain not working (Express behind IIS rewrite)
I want to set a top-level domain cookie (i.e. domain:".example.com") from sub.example.com.
I know I have to set the "domain" attribute like so:
const app = express();
app.get("...
1
vote
0
answers
12
views
Browser doesn't set cookies received from backend
I'm making a project which consist of:
frontend in React - hosted on netlify.app
backend in NodeJS ( ExpressJS + express-session ) - hosted on render.com
Client and Server and hosted on two ...
0
votes
0
answers
34
views
findOne in mongo not working in reverse direction [closed]
Below is some chat endpoint
app.post('/api/v1/chat', async (req: Request, res: Response) => {
const { senderId, receiverId, content } = req.body;
try {
const friendship = await ...
0
votes
1
answer
23
views
How to Resolve Route Conflicts in Express.js with Similar Route Paths?
I'm building a URL shortener API using Express.js, and I'm encountering a route conflict issue. Here are the relevant parts of my setup:
router.get("/", getAllUrls);
router.get("/:id&...
0
votes
1
answer
15
views
React axios request to node express app gets blocked by cors
I get this error when trying to make a request from react to my node server, even though I enabled cors so I dont understand why.
Error Message in the console:
Error message in the network tab:
...
1
vote
1
answer
25
views
Is there any way to have multer fail gracefully if a file is not in the request body?
I want to be able to capture when a file is not included in the request body and report it back in the response, but multer always bombs with the exception: RangeError [ERR_HTTP_INVALID_STATUS_CODE]: ...
-1
votes
0
answers
17
views
How do I pass request.body to morgan in a remix app powered by express server? [closed]
My remix (v2.4.0) app uses express as a server. The server.ts file is based on https://github.com/remix-run/blues-stack/blob/main/server.ts. I would like to log request body in an audit.log file.
A ...
0
votes
0
answers
22
views
Zoom webhooks validation in Node
EDIT:
If i use NGROK on my server, i can actually verify the endpoint.
What in the world is going on here lol. IS it because im using CERTBOT? is that not a trusted certificate authority?
im working ...
-2
votes
0
answers
16
views
hosting react frontend and express backend [closed]
Hey i m using express for backend and react for frontend.how to host both these servers and setup cors configurations
I m currently running react server on my local machine on port 5173 and express ...
0
votes
1
answer
31
views
How to store httpOnly cookie after redirect from custom SSO?
Context
There are two applications:
The auth-server - identity provider - this is my custom SSO solution.
The img-server - service provider - this application has some routes that I would like to ...
0
votes
1
answer
19
views
How do I extract Auth information from Express-served Firebase Function?
I'm using the strategy from this documentation to serve a microservice using Firebase Functions and Express.js: https://firebase.google.com/docs/hosting/functions#use_a_web_framework
Now what I want ...
-1
votes
0
answers
18
views
How do i get the gif images rendered to the frontend from the GIPHY API
i tried making a request to the GIPHY API and get the response in json form to render in the EJS frontend but previewing gthe live page, i`m only seeing the catch error message from the error handling
...
1
vote
0
answers
33
views
Websocket Connection errors in a Vue and express JS Application
I have an app with an express-server running on the backend, I have tried hosting the backend on ngrok as well but I still get a websocket error: The post methods are working fine and it does return ...
1
vote
2
answers
105
views
How to apply validator in the Express JS routes based on request header condition
I am passing a token in the request header and based on that I want to change a middleware parameter in the Express JS route.
The current route code:
this.router.post(
"/",
...
-1
votes
0
answers
10
views
File extension in typescript with express-session
I'm using typesript in an express project that uses sessions, the thing is that whenever I assign a new property to req.session, for example req.session.count, typescript says the property count doesn'...
0
votes
1
answer
31
views
Cant send back httpOnly cookie to server
So I am implementing the JWT access token / refresh token cycle. I send a refresh token in an httpOnly cookie and I want to send it back to the server.
The httpOnly cookie appears in the response 'Set-...
0
votes
1
answer
7
views
404 Error Occurs When Making POST Requests via Firebase Function
After configuring CORS to allow requests from any origin to resolve a previous CORS issue, I no longer get CORS errors, but now a 404 error occurs when making POST requests. I’ve checked the URL ...
-1
votes
0
answers
23
views
Unable to upload image to aws s3 from vuejs and express and paste the url into database
<template>
<LeftSideBar></LeftSideBar>
<div class="create-post">
<h2>Create a New Post</h2>
<!-- Form for post data -->
<form @...
2
votes
1
answer
49
views
Getting 404 on Express route when saving user
POST http://localhost:3000/auth/save-user 404 (Not Found)
submitForm @ signin.html:88
onclick @ signin.html:58
I am building a web site but I get this error in the sign in submit button....
1
vote
0
answers
12
views
downloaded file instead of load the app express vercel
I deployed in vercel for my express application. What appears on the dashboard is only a white page, and when pressed, it immediately downloads my server.ts file.
blank dashboard
build log looks good ...
-2
votes
1
answer
32
views
Is there a way to disable the download option of a video? [closed]
We are building an elearning platform and I uploaded the courses in cloudinary from cloudinary dashboard.
I am using React Player to display the video in the next.js app. I disabled the download ...
0
votes
1
answer
53
views
Compilation of different data types that is planning to transport over the network with HTTP
I am using the flutter_quill plugin, and I can transfer the content locally from the Flutter Quill editor to another Flutter Quill editor, and it serves read-only purposes. The content of Flutter ...
0
votes
0
answers
17
views
Struggling to connect express backend to mongoDB due to IP address issue [duplicate]
i am building a Full stack ecommerce website for my brand . i can't connect to mongodb atlas with vs code although everything the code and URI strings is correct . the error indicates has a IP address ...
0
votes
0
answers
17
views
Middle ware Error Handler not getting triggered in Express with TYpeScript
I'm new to express
I am trying to implement exception handling in my Prisma-Express-Typescript project.
I have spent a good amount of time on both Google and YouTube, but could not solve the issue.
...
-1
votes
0
answers
12
views
Heroku and Mailgun
I'm facing several problems with my API and WEB in production on Heroku. They have a unique system for reading the directory of things and this is returning several errors.
I have the current ...
-1
votes
0
answers
19
views
Error: getaddrinfo EAI_AGAIN - Ubuntu error [closed]
Before anyone says that there are many more posts on this - but I haven't been able to find the solution for me.
I am getting this error: Error: getaddrinfo EAI_AGAIN example.com (obviously censored ...
0
votes
1
answer
31
views
video using MediaSource API showing unending loading screen
I am trying to build a small streaming project using the MediaSource API.
I have a segmented video called earth into 6 segments of around 6 seconds each.
With the current project structure
vids/
...
0
votes
0
answers
8
views
express js session not being maintained
I separated the front end back end and implemented it, but even if I run an api like the bottom, it is only saved in the session at the beginning and there is nothing in the session if I call it up ...
0
votes
0
answers
9
views
Regrading the Release the connection back to pool in mysql2/promise
This is my connection pool
require("dotenv").config();
const mysql = require("mysql2/promise");
const db = mysql.createPool({
host: process.env.Dbhost,
user: process.env....
0
votes
0
answers
33
views
password authentication failure while connecting to Neon postgres db
I am working on a Nodejs/Express application, and I am trying to connect to a newly created Neon postgres database with knex ORM. My knexfile.js file is below. I have taken the values of all the env ...
-1
votes
0
answers
29
views
API endpoint not accessible with vercel dev - but works locally
I have a simple express js project. I am using the 'api' folder style that vercel expects for their new builder. I am able to deploy just fine to vercel cloud and also run via vercel dev.
However, I ...
0
votes
1
answer
51
views
Automated solution for serving Vite React frontend with Express?
When I build a MERN web site, I typically use Vite React to build the frontend and Express for the backend. In the past, I have used different hosts: for example, GitHub.com for the frontend and ...
0
votes
1
answer
41
views
+100
Express with nunjuck templates throws ERR_HTTP_HEADERS_SENT
I have Node.js project written in ESModule Typescript, using Express.js and Inversify. I'm looking to integrate Nunjucks as the templating engine although I get following error whenever i try to ...
-2
votes
0
answers
14
views
How to implement topic/hashtag schema in a MERN web app? [closed]
So this is where I come - I created a topic schema using mongoose:
const topicSchema = new mongoose.Schema(
{
name: {
type: String,
required: true,
},
count: {
type: ...
-3
votes
0
answers
18
views
Express.js post redirect get
I have a form, when submitted via POST I want to redirect and print the data submitted by the user. I will also use EJS. How do I properly share the data from the post body to GET /results?
router.get(...