First of all I’m extremely sorry but i can’t figure out what the title should be,
I’m trying to send data to MongoDB Database but for some reason, I keep getting 304 status code, I tried searching it on the internet but I couldn’t find a solution, and was hard for me to understand, can you guys please help me?
Here’s the data I’m trying to send to DB
const router = require("express").Router();
const User = require("../models/User");
router.get("/register", async (req,res) => {
const user = await new User ({
username:"username",
email:"[email protected]",
password:"123456"
})
await user.save();
res.send("okk!");
});
module.exports = router;
//
MongooseError: Operation users.insertOne()
buffering timed out after 10000ms
at Timeout. node_modulesmongooselibdriversnode-mongodb-nativecollection.js:151:23)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)