Before starting the post I would like to assume few things: You have knowledge about NodeJS. You have setup sample NodeJS app using express and mongoDB In case you have no idea what I am talking about then its best to know about them. Few links below will help. https://nodejs.org/en/ https://expressjs.com/ https://www.mongodb.com/ Now let’s getContinue reading “Using bcrypt to store password in NodeJS.”
Category Archives: Mongoose
Define schema, apply plugin and more in Mongoose.
I’ve been learning Mongoose and would like to share few notes. Let’s say we have Invoice schema like below defined in mongoose. To this schema I would like to add a new property / key / field that will define the status of the invoice, and this new property takes predefined values, like, an enum.Continue reading “Define schema, apply plugin and more in Mongoose.”