已采納回答 / 瓜瓜射門啦
這個跟 mongoose 的版本應(yīng)該沒啥關(guān)系,估計是代碼問題,比對下這兩段看哪里有寫錯沒?signin 時候的邏輯:<...code...>schema 里面的靜態(tài)方法定義:<...code...>
2014-10-07
已采納回答 / 瓜瓜射門啦
windows 下開發(fā)確實會有很多坑,我已經(jīng)有 3 年多沒有用過 windows 系統(tǒng)了,看這個報錯感覺是 bcrypt 這個庫安裝的有問題,試試從 stackoverflow 上搜搜相關(guān)的 issue
2014-10-07
已采納回答 / 瓜瓜射門啦
這就是加鹽的過程,同樣的密碼,最終生成的 hash 是不同的,具體比對則是通過 bcr看源碼, save 的時候:<...code...>首先造鹽,拿到一個 salt ,然后混合到 password ,生成最終的 hash,拿 aaabbb ...
2014-10-07
最贊回答 / 海河之家
查了stackoverflow(http://stackoverflow.com/questions/21234304/grunt-wont-load-the-node-server)Just change you options.file to script or keep both.nodemon: { ? ?dev: { ? ? ? ?script: 'app.js', ? ? ? ?options: { ? ? ? ? ? ?file: 'app.js',
2014-09-29
最新回答 / 冰寧496058
nodemon: { ? ?dev: { ? ? ? ? ?script: 'app.js', ? ? ? ? ?options: { ? ? ? ? ? ? ? args: [], ? ? ? ? ? ? ? nodeArgs: ['--debug'], ? ? ? ? ? ? ? ignore: ['README.md', 'node_modules/**', '.DS_Store'], ? ? ? ? ? ? ? ext: 'js', ? ? ? ? ? ? ? watch: ['....
2014-09-29
已采納回答 / weibo_SecturityE_0
嗯.這里確實是會這樣子.schemas 下的user.js ?封裝個靜態(tài)方法 findByName<...code...>然后 app.js 那里的find換成findByName 或者直接用findOne
2014-09-29
已采納回答 / int30xcc
我勒個去。。。糾結(jié)半天,,問題是我 concurrent里面的option少寫個s,,應(yīng)該是 options。。。。。跟著視頻敲代碼就是容易敲錯。。。。這個也不給錯誤提示。。心塞。。
2014-09-27