E:\sails_app\activeityOverload>npm install bcrypt --save
-
>bcrypt@0.8.5 install E:\sails_app\activeityOverload\node_modules\bcrypt
>node-gyp rebuild
E:\sails_app\activeityOverload\node_modules\bcrypt>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
在這個方案中一次建置一個專案。若要啟用平行組建,請加入 "/m" 參數。 (Visual Studio 2013 C++ Support)
blowfish.cc
bcrypt.cc
..\src\bcrypt.cc(232): warning C4267: '=' : conversion from 'size_t' to 'unsigned char', possible loss of data
[E:\sails_app\activeityOverload\node_modules\bcrypt\build\bcrypt_lib.vcxproj] bcrypt_node.cc ..\src\bcrypt_node.cc(76): warning C4244: 'argument' : conversion from 'ssize_t' to 'unsigned char', possible loss of data
[E:\sails_app\activeityOverload\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(135): warning C4244: 'argument' : conversion from 'const ssize_t' to 'unsigned char', possible loss of data
[E:\sails_app\activeityOverload\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(229): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
[E:\sails_app\activeityOverload\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(230): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
[E:\sails_app\activeityOverload\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
win_delay_load_hook.c
Creating library E:\sails_app\activeityOverload\node_modules\bcrypt\build\Release\bcrypt_lib.lib and
object E:\sails_app\activeityOverload\node_modules\bcrypt\build\Release\bcrypt_lib.exp
Generating code
Finished generating code
bcrypt_lib.vcxproj ->E:\sails_app\activeityOverload\node_modules\bcrypt\build\Release\\bcrypt_lib.node
bcrypt@0.8.5 node_modules\bcrypt
├── bindings@1.2.1└── nan@2.0.5
module.exports={schema:true,attributes:{...},beforeCreate:function(values,next){// This checks to make sure the password and password confirmation match before creating recordif(!values.password||values.password!=values.confirmation){returnnext({err:["Password doesn't match password confirmation."]});}require('bcrypt').hash(values.password,10,functionpasswordEncrypted(err,encryptedPassword){if(err)returnnext(err);values.encryptedPassword=encryptedPassword;// values.online= true;next();});}};