Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Hash Password Data In MongoDB With Mongoose And Bcrypt

When creating a web application that handles user information it is a good idea to protect anything considered sensitive rather than storing it as plaintext within a database. The goal is to make it as difficult as possible for a malicious person to obtain access to this sensitive information. Rather than encrypting sensitive information with the knowledge that it can one day become decrypted, it is better to hash this sensitive data instead because hashing is a one-way process.

In this tutorial we’re going to take a look at hashing password data with bcryptjs before storing it in a MongoDB NoSQL database with Mongoose and Node.js.

Read More

Building A REST API With MongoDB, Mongoose, And Node.js

About a week or so ago I had written a tutorial titled, Getting Started with MongoDB as a Docker Container Deployment, which focused on the deployment of MongoDB. In that tutorial we saw how to interact with the MongoDB instance using the shell client, but what if we wanted to actually develop a web application with MongoDB as our NoSQL database?

In this tutorial we’re going to see how to develop a REST API with create, retrieve, update, and delete (CRUD) endpoints using Node.js and the very popular Mongoose object document modeler (ODM) to interact with MongoDB.

Read More