Category "express"

steam passport implementation, convert from express to nestjs

I've started to convert express project to nestjs. How should it work in Nestjs. Here is working code from Express. (Code below just redirects to steam sign-in

How to pass a file to server and then send it back to client?

I'm currently working with pdf files in ReactJS and modifying them in my server side. The problem is, i don't know how to pass my file data to the server side a

Get and render image from API in (Vue)JS?

I have a website running VueJS at localhost:3000 which does some stuff to call this.nextImage(). methods: // content // async nextImage() { console.log("In

Next.js serving static files that are not included in the build or source code

I have files that are not stored in a CDN and would like to serve them with Next.js. These files are not intended to be integrated into Next.js and should not b

I can't call PATCH method using Pug, Mongoose and Express.js

I am new to code and I apologize in advance for all my noob mistakes. I'm trying to set a new color to an existing object stored in MongoDB using the PATCH meth

IPFS Pinata service not accepting file

I have a code as shown below that uploads files from the browser and saves in the server, once it has been saved to the server, I want the server to connect to

Test Suite Failed to run

Error thrown: "Exceeded timeout of 5000 ms for a hook. Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test." 24 | &

When I am trying get cookies it gives me error as -> TypeError: Cannot read property 'token' of undefined

I have created jwt token as follows: const jwt = require('jsonwebtoken'); const mongoose = require('mongoose'); const bcrypt = require('bcrypt'); const userSc

Method expression is not of Function type (mongoose Model)

i came across this error today and did not find a fix for it. const mongoose = require('mongoose'); const userSchema = mongoose.Schema({ name: {type:St

DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

I am deploying my angular application on tomcat server. I have run the ng build --prod command and copied my dist folder on the server. Before accessing the pag

Socket.io is working on localhost but not working after deploying heroku?

Here is the code of my socket server const io = require("socket.io")(8080, { cors: { // origin: "http://localhost:3000", origin: "https://mern-bubble.he

Jest test a function integrated with the ssh2-sftp-client library

I need to test a function that write a file from local path to remote path on an sftp machine using shh2-sftp-client library. my own function is the following:

How to get Realtime Logs in Elastic beanstalk like Heroku

I am moving from Heroku to Elastic Beanstalk as advised by some team I am working with. Now, when I was with heroku I got the benefit of real time logs as reque

How do I redirect to Google's consent page for Oauth2.0 in NodeJS Web app?

So I am creating an application with NodeJS and Express and some HTML. Basically after the user clicks login, it is supposed to make a GET request to the follow

res.set('Content-Type','image/jpg') is not working while serving image in node js

res.set('Content-Type', 'image/jpg') is not working while serving us files in node js. Please take a look at code what is wrong with this code. I am getting the

How to update mkdir in order to install express-generator without warnings?

I was going to install express-generator on windows computer. I used thisnpm install -g express-generator command in cmd and it gave me thisnpm WARN deprecated

How to resolve persistent node error "EADDRINUSE"?

I'm trying to run an http server through node but I keep getting the EADDRINUSE error with specifically port 5000 (trying various others works fine). I have tri

How to fix cloudinary error "Must supply api_key"

I'm building an image upload app using multer and cloudinary. I've configured my environment variables properly using dotenv. However, when I try to upload file

Mongoose and MongoDB - Get all countries and users associated with country

So I have a list of posts data that looks like this: [ {user: 'Bob', country: 'USA'} {user: 'Kim', country: 'Mexico'} {user: 'Darren', country: 'Mexico'}

How to assign ROLES in _user DB for Cloudant

How do I add Roles to users in the Cloudant user database?(_users) I have not been able to sort this out using Google or Cloudant Docs. I see some mention of a