Category "express"

"TypeError: require(...) is not a function" in nodejs and socketio

I am creating a chat with NodeJS, Express and Socket.Io, but I have this error when I want to run the code: require('./sockets')(socketio);

How to create a middle layer for two different servers running independently in node.js

I am trying to implement a node.js layer between two servers which will help in redirecting to the respective server on a route/url change, provided both the se

Can't create a simple webhook fulfillment Good Actions Console

I am trying to do a simple google home integration with my home server. My only goal is to have it say "Hey google, turn on pool lights" and "Hey Google, turn o

Express cors get origin = 'null' with type string

Express CORS is failing for my nodejs application and I need your help fixing it. The reason is that the app is getting null with type string as origin, which i

Change sequelize timezone

I want to make restful app in nodejs Server: centos 7 64x Database: postgresql Additional: express, sequelize Table: datetime with timezone When I selecting r

how to receive a multi select in expressjs

Hello I have a multi select that looks like this input.form-control(type='text', name='names[]') I want to retrieve does values. I'm using this var names =

Best way to store DB config in Node.Js / Express app

What would be the best way to store DB config (username, password) in an open source app that runs on node.js / Express? Two specific questions: Shall I put it

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'unlink' of undefined at Grid.remove

I'm trying to delete a file by its id using gridfs but I get this error when calling the delete API. Controller : let gfs; connect.once("open", () => { gf

tsc not found in typescript express and react app when deploying to heroku

I am working on an express app(in typescript) and a react app bootstrapped with create-react-app(in js). The directory structure is here. The server directory c

Extend Express Request object using Typescript

I’m trying to add a property to express request object from a middleware using typescript. However I can’t figure out how to add extra properties to

Authentication between different applications through sessions (React + Express)?

I'm developing a React + Express website and I'm in doubt on how to implement the login functionality since it depends on another application. Let me explain it

Passing variables to the next middleware using next() in Express.js

I want to pass some variable from the first middleware to another middleware, and I tried doing this, but there was "req.somevariable is a given as 'undefined'"

Express middleware - add promise rejection handlers

I have the following simplified middleware function: router.put('/', function (req, res, next) { const data = req.body; const q = req.parsedFilterParam;

nodejs terminates on redis failure

I am using Node.js, Express, Redis and Socket.io. When Redis is down, Node.js will terminate. How can I prevent this, probably somewhere to code reconnection o

express route parameters keeps loading

I can see the dynamic id that appears on the URL but the page keeps loading... I have attached the route that HTML redirects us to and the database. // Route Pa

Getting error "Converting circular structure to JSON" while working with express,mongodb

I'm trying to find tours within a specific distance.here is my code exports.getTourWithin = catchAsync(async (req, res, next) => { const { distance, latlng

Handling multiple requests without previous one blocking the next one

I have problems trying to handle multiple requests from the client. By right, each route should be handled asynchronously, however I can't make handling request

Handling multiple requests without previous one blocking the next one

I have problems trying to handle multiple requests from the client. By right, each route should be handled asynchronously, however I can't make handling request

multer file upload - how to get a value from multer in route?

I'm uploading a file using multer with Express. I'd like access a value from multer's storage object inside the route. How can I do that? Multer configuration (

Req.Params.Token returns undefined

In my code, I have my registration page send out a verification email once the form is filled out and submitted. They receive the link to their email to verify