Category "express"

request I made to the database server in the apk of my React native android application does not work

in my react-native app, I created a server with express js to connect to the database. And I created api to get data from database. This api works successfully

My auth app does not save data to session

Creating Auth application using express mongoose and passport js. after adding mail verification using nodemailer server sptoped adding user from req.user to r

How does custom made asynchronous wrapper work?

I was following a code along video in Node.JS and creating the backend of a CRUD application. I was able to understand the logic for all the controllers for the

Socket.io client is not connecting to the server

I am trying to connect to the socket.io client using the following server-side code... const express = require("express"); const { createServer } = require("HTT

Jest with TypeScript (Backend - Node/Express) says Cannot use import statement outside a module

I am working on Jest tests for a Node/Express TypeScript backend. I recently learnt about global test setup which I am implementing to reduce similar variables

Intermittent (time dependent) error when using Node Package rate-limiter-flexible in Express Node.js application

My overall goal is to apply the basic logic of the package "rate-limiter-flexible" for my Express Node.js application. I've gotten the basic functionality with

Deleting user profile Mongoose and Express

I am creating a route from back end to be able to delete a profile once its been created but Ienter image description here am getting an error from postman say

How to identify a client with nodejs/express?

I am creating a web app that offers a membership access with a trial period. However, I need to be sure the users cannot create a new account with other credent

What are "signed" cookies in connect/expressjs?

I am trying to figure out what "signed cookies" actually are. There isn't much on the net, and if I try this: app.use(express.cookieParser('A secret')); But

Prevent multiple fast clicks from triggering API

For my project a instagram-clone, I have a like and dislike button. If there are no likes or dislikes from the current logged in user, both will show black. If

session changes are losing when request ends in react and nodejs

Hi am trying to implement authentication using node js sessions in file mainLoginArea.js i am calling a function goButtonClicked which helps user to sign in by

How can I download image using GridFSBucket?

I tried everything I found on internet but nothing solved my problem. I really need help on this problem. I'm following the tutorial "How to upload/store images

Express + Typescript: How to GET Param and Body request

I route put method to this const createFaceList = (req: Request<{faceListId : string}>, res: Response, next: NextFunction) => { console.log(req.body.n

How do I make Heroku to listen to multiple ports?

I am trying to host my application on Heroku but I get the below error from the logs: Error: listen EADDRINUSE: address already in use :::27427 Apollo Server:

Why does my middleware produce an error when running get request by ID

I have just a simple API I am building for school. There is a collection of Books that are being accessed, displaying book by id, displaying all books, adding b

when i use uuid the code unexpected crash, and then works fine?

const express = require('express'); const { uuid } = require('uuidv4'); const app = express(); app.use(express.json()) const projects = []; app.post('/proj

Upload/Store multiple files with multer, i.e image and pdf with single request in nodejs

The following code works to upload a single image to upload an image and store its path in the database, now I can't find a way to upload an image and a pdf fil

Create JSON dynamically with dynamic keys and values in Express Js

I am fetching API into my Express server which has several JSON key value pairs in one array. For Example: [{ "quality": "best", "url": "https://someurlhere.e

what should be the default value of file in react-typescript in useState

How do I initialize a file through useState in React Typescript? const [images, setImages] = useState<File>(); const [formData, setFormData] = useSt

Setting a title and favicon for non-html files on a website

Is there a way to set a title and favicon for non-html files on a website? For example, a link like https://example.com/files/image-or-something.png. By default