I am getting the above error when running the following code in my express app. When I go to localhost:3000/cards.
This is in my cards.js file.
const express = require('express');
const router = express.Router();
const { data } =…
How to set timeout for all requests and if timedout then respond with custom json?
I tried to use:
import * as timeout from 'connect-timeout';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './app.module';
const port…
I'm building a node/express app and am using the express-session and mongo-connect modules to store my sessions and persist them on restart.
However, a new cookie ID is still generated every time I restart the server. I've narrowed the problem down…
We have a node application running behind Amazon Elastic Load Balancer (ELB), which randomly throws 502 errors when there are multiple concurrent requests and when each request takes time to process. Initially, we tried to increase the idle timeout…
I'm trying to find the dimensions of the images in a production machine.It returns error.
Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%wx%h" "uploads/userPhoto-1499669685192.png" this most likely means the gm/convert…
I've build a simple app using Vue.js and their vue-cli webpack.
I've used vue-router to control navigation around the site with the different views. This works fine when running locally.
I'm now wanting to deploy this onto Heroku, however the urls…
The server side of my app was built using Node with express,
It was working fine locally, but now I've uploaded to Heroku
I'm getting CORS errors, even though I've handled it within the app
index.js
var express = require('express');
var bodyParser =…
I am using Typescript in Node.js. When you use Express middleware, you often transform the Request object. With Typescript, however, we could not track how the Request object was transformed. If you know the middleware that passed before, is there a…
I have code for reading an image from directory and sending it to index.html.
I am trying to replace fs.readFile with fs.createReadStream but i have no idea how to implement this as i can not find a good example.
Here is what i got (index.js)
var…
have been going different routes for 2 days now and can't figure it out. Perhaps someone can shed some light on my problems. I am trying to run a botserver that connects to multiple plaforms and already have around 5 working.
I am now also trying…
This is the question mostly asked by the beginners, as I had this question when I was starting out
How to set port for express without needing to hardcode or even choose port yourself? This is the question I had when I was starting out in node and…
My Express.js app has been throwing Cannot read property 'req' of undefined. In essence, it listens for a GET request, grab the content query, and then reply with a table. Here's the parts that present the problem.
index.js
var panels =…