The Wayback Machine - https://web.archive.org/web/20201011233434/https://github.com/topics/mongoose
Skip to content
#

Mongoose

mongoose logo

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Mongoose includes built-in type casting, validation, query building, and business logic hooks.

Here are 10,105 public repositories matching this topic...

juanda99
juanda99 commented Sep 30, 2016

It would be better to use bcrypt, beause its more secure as it's slower (uses more computing cycles).
Your code could also be better:

You wouldn't need salt field in User model, because it's saved into the same field as password does.

For authentication, something like:

var mongoose = require('mongoose'),
  bcrypt = require('bcryptjs');

var userSchema = mongoose.Schema({
  email: String,
JKHeadley
JKHeadley commented Jul 21, 2018

See: https://gist.github.com/ericelliott/f3c2a53a1d4100539f71

Advantages

See: https://medium.com/javascript-scene/you-might-not-need-typescript-or-static-types-aa7cb670a77b

  • autocomplete and type inference with most IDEs
  • doesn't require passing Log objects for every call (although it's encouraged)
  • other non-required parameters (such as query) can be omitted
  • much easier to a

This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
  • Updated Oct 3, 2020
  • JavaScript

Created by LearnBoost

Released 2010

Latest release over 5 years ago

Repository
Automattic/mongoose
Website
mongoosejs.com

Related Topics

mongodb nodejs odm orm
You can’t perform that action at this time.