Skip to content

Tag: express

users is not defined in nodejs at bcrypt.compare

I am doing the following thing in node js 1.register and save user in mongodb 2.generate token when registered. 3.authorization using token 4.login user and this is my router file but when i give post request . It says users is not defined at pls find an solution for this . I am sorry if it is a silly or

express post request body shows up as empty

server code client code terminal shows: {} tried pretty much everything so help would be very much appreciated thanks in advance:) Answer You said mode: ‘no-cors’ which tells fetch to silently ignore anything which requires CORS permission. Setting the Content-Type to application/json requires COR…