Questions tagged [express]

Express.js is a minimal and flexible Node.js web application framework providing a robust set of features for building web applications.

86,614 questions
0votes
0answers
22views

Reasons as to why ScrollWidth would return wrong values

I created a simple carousel using flex. The carousel works fine when I load it as a simple .html file, but once it gets rendered/loaded (res.SendFile or res.render) through express.js in NODE.JS ...
0votes
0answers
12views

React acting weird (compiled with problems 9 errors)

I've been working with react using mern stack. Everything was fine until I used JSON.parse in a function when getting data out of the mongo database. I clicked save and I got 9 errors. I removed all ...
0votes
0answers
8views

Winston http log level behaves different than info

I am using winston to log incoming request on a node v16 express.js server using following code sample (boiled down to the essentials to reproduce the behaviour). I am not sure what is causing this ...
0votes
0answers
13views

i get 'Error: ENOENT: no such file or directory' when i upload file to the server [duplicate]

i got this error when trying to upload an image using multer. this is my fileStorage settings: const fileStorage = multer.diskStorage({ destination: (req, file, cb) => { cb(null, 'images'); ...
0votes
0answers
7views

How to use graphql dataloader loadMany function properly in nestjs?

I want to use dataloader loadMany function in nestjs. Can any help me to use it properly- dataloader.service.ts- @Injectable() export class DataloaderService { constructor(private readonly ...
0votes
0answers
10views

how can I output the websocket live feed to client browser DOM?

These are my goals. connect to websocket API as a client output these websocket messages to a specified browser DOM(client-side) . connecting to websocket on nodeJS const WebSocket = require('ws');...
-1votes
2answers
19views

Header name must be a valid HTTP token, nodejs?

I am trying to create API which will return self hosted URL. This is my code const app = require('./app'); const config = require('./config/config'); const logger = require('./config/logger'); let ...
  • 9,390
0votes
1answer
22views

How to find device information while setting cookies in nodejs?

I have checked two packages express-session and cookie-parser. I need to find the user's trusted device information. When a user tries to log in from another device. I need to find it. Is it possible ...
0votes
0answers
14views

how to create document using nested mongodb schema?

I'm trying to create a new document using javascript for mongoDB database, and add values to deeply nested properties in the schema. Specifically i'm trying to add values to the taskItem, highlight, ...
-1votes
0answers
23views

Node Js convert Express webserver , Cors, MySQL database connection to C# .NET [closed]

I am trying to convert a web service that I created in node.js to C# .NET . Below is the JS code: const express = require('express'); const cors = require('cors'); const mysql = require('mysql2'); ...
0votes
1answer
12views

React: How to Add and update Elements into an Array in MongoDB

I am sending a new item to the database and inside that data there is an array with some id. I'm using node and expressJs. So, the idea is If there is an object exists, I want to update the array ...
0votes
2answers
24views

req.body returns undefined even though it worked before

req.body is undefined even though it worked a couple of days ago, i even tried using the now depreciated body-parser and nothing, this is my code: JS: var express = require("express"); var ...
0votes
0answers
11views

ExpressJS : SQLITE_RANGE: column index out of range WHERE condition

I am working on a project using express , EJS and SQLite , So i made a function that select data from the database, and render it to the interface, this is the function: function findHomeforSell(req , ...
0votes
0answers
15views

EJS does not see an existing view

Error: Failed to lookup view "home" in views directory Why the app can't see the view called home? The same folder that contains app.js file contains a folder called "views" with ...
0votes
0answers
10views

upload entire folders using html nodejs

I'm currently trying to build a File Uploader with Node.js and it works fine for single files, I need to upload folders tho. The folder structure within the uploaded folder should stay intact. ...

153050per page