Whats the recommended method to prevent xss in express
I’m using xss-clean package to prevent XSS attack in my express-mongodb application. But its showing deprecated. I saw the announcement but can’t understand what there talking about.
how to update many records at once in mongodb
i’m using expressjs and mongodb to update an order
How to handle multiple requests (Express.js) with mongodb insert operation
Context I am following a tutorial which is titled “Building a Secure User Registration and Login API with Express.js ,MongoDB and JWT” It uses express bcryptjs jsonwebtoken mongoose to build a simple web server with register/login functionality. The problem The problem arise when I send a multitude of requests to /api/register. Server creates many users […]
Node.js Express MongoDB is not connecting
var express = require(‘express’); var router = express.Router() var MongoClient = require(‘mongodb’).MongoClient /* GET home page. */ router.get(‘/’, function(req, res, next) { res.render(‘index’, { title: ‘Express’ }); }); router.post(‘/submit’, (req, res, next)=>{ MongoClient.connect(‘mongodb://localhost:27017’, function(err, client){ if(err){ console.log(‘Error’) }else{ console.log(‘DB Connected’) } res.send(req.body) }) }) module.exports = router; I was trying to connect to the database, […]
what is the issue of uptdate method of mern app?
I’m starting to work on a MERN project. I have a basic understanding of the technologies involved, but I’m encountering an issue with the update function not working as expected.
How should i get the id of the matched object from a array in mongodb?
How should i get the id of the matched object from a array?
Currently i am getting all the ids from pricing array.
Express node js function
what happens here how does it recieve data from a client. Is it simlar to an async function?
MongoDB finding document containing part of string got some problems
models/userModel.js
Migrating From Javascript To Typescript Environment
I recently got onboarded to a legacy database written in Javascript. The codebase is a bit messy and I was asked to build an Admin panel it Typescript.
Get collection size in bytes of mongoDB collection in nodejs
I am looking for a way to get the collection size of a mongoDB collection in nodeJS including the indexes.