Skip to main content
Filter by
Sorted by
Tagged with
23 votes
4 answers
23k views

Could anyone explain what is the best approach for node express app: CommonJS or ES Modules as of today? In the official documentation it shows that CommonJS module is used, however there are many ...
90 votes
20 answers
153k views

I am following this article ((http://nodeexamples.com/2012/09/21/connecting-to-a-postgresql-database-from-node-js-using-the-pg-module/). I have already deployed my app to heroku and currently using ...
0 votes
1 answer
59 views

I am using HttpOnly Cookies for JWT authentication in my Angular v20 app. I have SSR enabled. During Login, the cookies are sent to the client. I have an HttpInterceptor that seems to work to forward ...
0 votes
1 answer
66 views

This is TypeScript code that I wrote a couple of years ago: import { expressjwt } from "express-jwt"; import { Request } from 'express'; class Authentication { static loginRequired() { ...
119 votes
5 answers
312k views

I am a freshman in Nest.js. And my code as below @Get('findByFilter/:params') async findByFilter(@Query() query): Promise<Article[]> { } I have used postman to test this router http://...
0 votes
0 answers
83 views

Handlebars: Access has been denied to resolve the property "status" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this ...
192 votes
22 answers
394k views

I am working with Node.js and Express.js. I try to store an account in session. So, I tried to use a session with this code in Express.js var RedisStore = require('connect-redis')(express); app.use(...
1 vote
0 answers
21 views

I'm deploying a Bun + Express application to Vercel. Locally, my Express app works perfectly with routes defined in separate files and imported into index.ts. However, on Vercel, the deployment ...
Best practices
1 vote
3 replies
41 views

I’m trying to build an application that can download patient documents from Athenahealth, but I can’t figure out whether this is actually supported. The official API documentation is extremely limited ...
3 votes
2 answers
9k views

I am getting in to NodeJS and have followed some video tutorials for making stuff, to understand NodeJS and Express. It turned more in to copying as little were explained, so tried to make my own ...
Best practices
1 vote
3 replies
65 views

So I am working on a MEAN stack project where in node I will emit the data to UI and in frontend I had some widgets ( as charts like gauge , line , pie and table ) where user can add dynamically ...
1 vote
5 answers
2k views

Hi all, I am new to node.js and express.js I am having little bit confusion on creating server on node.js and express.js. In Node.js we use the http module to create a server. where as in express we ...
14 votes
5 answers
4k views

What should I do with function of registration to fix @typescript-eslint/no-misused-promises. The one way I found how to fix this problem is write by eslint. "@typescript-eslint/no-misused-...
9 votes
7 answers
26k views

I am using npm bull to add my queue job to handle sending mail for my project. It runs without problems for a long time, but recently it shows this error: Error while handling task collect-metrics: ...
6 votes
3 answers
18k views

My folder layout in Node.js (I installed Express.js): sdk-components --- HlsLoader.js node_modules --- hls.js --- src --- index.html --- index.js --- ...
-3 votes
0 answers
66 views

I need to implement role-based access control on the backend with postgresql, Prisma, and Express.js+TypeScript and the roles I have in mind so far are admin, manager, customer, delivery crew. I want ...
5 votes
2 answers
1k views

I'm deploying my api with Vercel CLI, and when I run vercel dev I get this message: Error: Your package.json file is missing a build property inside the scripts property. Indeed, in my package.json I ...
1 vote
4 answers
1k views

My react and angular application (UI have two parts) are running using node/express application on port 3000. On server.js (node-express entry point) I dynamically handle which UI to render (react or ...
2 votes
2 answers
2k views

How can I define routes for Websockets using the ws library within an ExpressJS app? It's very easy to set it up the two layers in parallel, but the Websocket layer will not be able to benefit from ...
1 vote
1 answer
9k views

I'm currently working on learning NodeJs and am running into a problem with passing query parameters. The stack consists of express, request-promise, and mongodb. The design of the application I'm ...
2 votes
1 answer
1k views

I have a input file to upload image with multer. I want to add Joi validation to this Input for uploading images only , Im working with Node.js and Express.js Code : let schemaValidation = Joi.object({...
27 votes
5 answers
19k views

I would like to serve an html file without specifying it's extension. Is there any way I can do this without defining a route? For instance instead of /helloworld.html I would like to do just /...
3 votes
3 answers
13k views

The goal is simple, I want to query enum field in the where clause. Example prisma version is: "prisma": "3.11.0" schema.prisma model Todo { id Int @default(autoincrement()) @id ...
2 votes
1 answer
94 views

How to add data from an input field in the browser to my array websites[name], and then display it in a html paragraph? server.js import express from "express" import { websites } from "...
3 votes
2 answers
12k views

I am testing API for User functionality (signup and login) using jest. Code for testing: const request = require('supertest'); const app = require('../../app'); describe('Test User Functionality', (...

1
2 3 4 5
1900