All Questions
Tagged with express typescript
2,728
questions
1
vote
1
answer
17
views
Typescript: Variable inside Express RequestHandler becomes possibly undefined despite being checked in an if statement
I am creating a way to dynamically create routes before the server fully starts (meaning I'm not creating a route via a request lol that would be crazy), and I stumbled upon this interesting quirk.
...
0
votes
0
answers
5
views
Creating first Turbo Repo package for a logger failing to import
I am working to setup my first Turbo Repo project using a mix of Next for the UI and Express for the API. I am trying to create a logging package I can include in the API app but also eventually the ...
0
votes
0
answers
29
views
How to properly package a Node.js and React app stripping the container of all unneeded files?
I have a Node.js backend that serves up the React frontend (later I can do CDN probably) and for now, I plan on disallowing CORS so React must talk to my Node.js backend only. The prototype for this ...
-2
votes
0
answers
17
views
How to do client generation and scaffolding generation [closed]
On my previous project, every client microservice used an API interface to talk to another microservice. The client was generated for all microservices. The generated client translated the DTO request ...
1
vote
1
answer
49
views
Handling Form Data and User Registration in MERN Stack: Issues with FormData and Validation
I am working on a MERN stack application and I'm having trouble registering a new user. I have a form on the frontend that collects user data and sends it to the backend. The form data includes fields ...
-1
votes
0
answers
20
views
Is it possible to write purely oop code in express in typescript? [closed]
I was trying to write pure oop code in the express backend as I am using typescript but I was confused that is it possible to use the pure oop in my backend ?
I tried to learn using oop but got no any ...
0
votes
0
answers
34
views
Fetch Backend Server Without caching data
I'm using Next.js and I'm trying to fetch some data stored in my backend server. My back and my front are both deployed on Vercel. The problem is the data fetch doesn't change despite the number of ...
0
votes
0
answers
18
views
Session Cart Resets After First Product Addition in Express.js Application
I'm building an online store application using Express.js, and I'm having trouble with session persistence. The cart works fine the first time I add a product, but if I add another product or make any ...
0
votes
0
answers
34
views
Auth0 callback route - visible in requests but not executing related code
I have an express backend to which I added Auth0. I'm also using express-openid-connect to handle most of the work. The problem is that whatever I do, I cannot get the callback route to work. I see it ...
1
vote
1
answer
52
views
In TypeScript, how to solve the error: 'ReferenceError: HTMLElement is not defined'
I am trying to use TypeScript while I build a SPA on top of NodeJS and Express.
I'm type-hinting my modules to return types of HTMLElement, but it seems to give me an error.
For example:
export ...
0
votes
0
answers
5
views
Searchbar API: i need to create search bar api in which data will get from database user record by using name, email or number
i am learning backend, new to express framework and having difficult creating search bar api, i am using typescript, express.js with prisma & postgresql with db client Dbeaver, help me out how to ...
0
votes
1
answer
49
views
Failed to custom Response type in Express.js using TypeScript
I am trying to custom my own Response interface to extends some methods instead of using default Response type of Express.js but I am getting an TypeScript error:
The last overload gave the following ...
0
votes
0
answers
45
views
Express js swagger dynamic routes
I have an express application, that I am reading some JSON files and creating the application routes based on those JSON files. Each object of the JSON files, describes the request type, the path, the ...
0
votes
0
answers
50
views
pg-mem with typeorm for in memory jest testing
i have a express app i am creating in typescript. I also am using typeorm as my orm for connecting to the database and actioning on it.
I already have jest unit tests but i also wanted to create ...
0
votes
0
answers
20
views
How to properly perform one-to-many relationship query in sequelize-typescript?
I've a question to ask and probably would like to apply it on my personal project. I have Photo and Album as my tables and subsequently on my code as my data models:
Album.ts
import { Column, ...