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 | &
I have created jwt token as follows: const jwt = require('jsonwebtoken'); const mongoose = require('mongoose'); const bcrypt = require('bcrypt'); const userSc
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
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
Here is the code of my socket server const io = require("socket.io")(8080, { cors: { // origin: "http://localhost:3000", origin: "https://mern-bubble.he
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:
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
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 us files in node js. Please take a look at code what is wrong with this code. I am getting the
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
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
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
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 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
I'm creating a WebApp that has a React front end whose build is served by a node.js back end. There is some security implementation using Auth0 token validation
We can build complex queries with Mongoose with options like $lte, $gt, $ne and so on... but I'm wondering where/how we should build those queries? If I have a
Consider this code: setContext(async (req, { headers }) => { const token = await getToken(config.resources.gatewayApi.scopes) const completeHeader
I have a backend that uses Node and the Express framework and a frontend in React. The code is in Typescript. My backend uses the elastic search client to fetch
I have a business hours object in a mongoose schema that represent a date. I'm passing a json object and retrieving the to parse to Date as string. I wonder if
This is the code I took from my professor's tutorial. LoginComp is just {username: '', password: ''} const request = new Request("/users/login", { method: "