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 8,958 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,
ChristofferSkog21st
ChristofferSkog21st commented Mar 9, 2019

The features section in the docs states that nodemon is available in the project, when it's clearly not. It's not added as a dependency or as a command in the project. Maybe remove this from the docs or actually add nodemon?

BrettKoenig
BrettKoenig commented Oct 11, 2019

I'm not sure if this will be included when the book is finished, but getting the config values for the .env file requires getting values from a lot of different sources and different configurations. It would be helpful if there was better documentation around that process.

I would love to submit a PR for it, but I haven't been able to figure all of it out myself yet.


<
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
nodepress
qingfengming
qingfengming commented Sep 23, 2018

npm install error : 依赖的包(ssh://github.com/surmon-china/mongoose-paginate.git)不存在

i@mingbai:~/node/nodepress$ npm install
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/surmon-china/mongoose-paginate.git
npm ERR! 
npm ERR! Permission denied (publickey).
npm ERR! fatal: 无法读取远程仓库。
npm ERR! 
npm ERR! 请确认您有正确的访问权限并且仓库存在。
npm ERR! 
npm ERR! ex
ryanvanderpol
ryanvanderpol commented Apr 8, 2020

I've been trying to write a query to give me all the documents created in the last week but I couldn't figure out how the operator syntax works. The documentation in the README has almost no high-level explanation of how the syntax works out-of-the-box. There's some stuff in there about building support for custom relations, and some other fairly deep stuff, but nothing that shows you can simply

Created by LearnBoost

Released 2010

Latest release about 5 years ago

Repository
Automattic/mongoose
Website
mongoosejs.com

Related Topics

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