linwalker / node-login Goto Github PK
View Code? Open in Web Editor NEWlogin example depend on (node-koa-mongodb)
login example depend on (node-koa-mongodb)
如题
// 下面会代码执行时,会直接先跳过save的回掉处理,路由返回404,再执行err回掉,原因暂不清楚
// await newUser.save(err => {
// if (err) {
// ctx.body = result;
// } else {
// ctx.body = {success: true, message: '注册成功'}
// }
// })
再就是doc.errors有errors这个属性吗
et user = await User.findOne({username});
如果schema:定义用户名为Number,就这findOne就会报错,请问该如何处理
npm install
[email protected] install D:\workspace\node-login\node_modules\bcrypt
node-gyp rebuild
D:\workspace\node-login\node_modules\bcrypt>if not defined npm_config_node_gyp (node "D:\nodeWeb\nodejs\node_global\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "D:\nodeWeb\nodejs\node_global\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (D:\nodeWeb\nodejs\node_global\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder. (D:\nodeWeb\nodejs\node_global\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at D:\nodeWeb\nodejs\node_global\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "D:\nodeWeb\nodejs\node.exe" "D:\nodeWeb\nodejs\node_global\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\workspace\node-login\node_modules\bcrypt
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodeWeb\nodejs\node_cache_logs\2017-12-15T13_07_27_127Z-debug.log
想了挺久,还是想不明白,该怎么处理前后端分离场景的三方授权登录。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.