Skip to content
Advertisement

Tag: express

Docker is not accepting proxy api server

i get the following error, when doing a docker-compose up. The app is running but cannot make any api post/get requests. The express server is using port 5000. ] [HPM] Error occurred while trying to proxy request /api/users/user from localhost:3000 to http://localhost:5000/ (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors) Despite having the react proxy set up, the error persists. setupProxy.js Dockerfile docker-compose.yml package.json Answer I

UnhandledPromiseRejectionWarning: This error originated either by throwing inside of an async function without a catch block

I am getting following error in my Node-Express App UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) To say the least, I have created a helper function which looks something like this and then I

How to execute multiple mongoose queries asynchronously and wait until all of them finish executing before sending response?

Thanks in advance, but could someone explain to me how can I execute a different query for each property of my request? I am trying to create a search sidebar menu, when user changes checkbox values I create an object with these properties: I want to push a query into an array of functions and then execute them using async.parallel

sequelize compare date with date-timestamp

my simple use case is I pass a date and try to compare that with the default createdAt column. and my date is a string like this date = ‘2018-12-12’ The problem here is sequlize not compare only the date. But it does add time 00:00:00 to my date and then compare. So the query sequlize generate is like this.

Advertisement