2016年1月19日
摘要: router.post('/register',function(req,res,next){varrestResult=newRestResult();varmobile=req.body.mobile;if(!/1\d{10}/.test(mobile)){//手机号码格式校验restResul... 阅读全文
posted @ 2016-01-19 05:55 jayruan 阅读(2708) 评论(0) 推荐(0) 编辑
摘要: https://cnodejs.org/topic/50dde64ea7e6c6171a80a678各位大神好,好久没写点什么东西了,最近也是cnode社区不知道咋的了都登录不进去,今天总算能回到这里,今天遇到这样的一个问题,发出来咨询下各位。 mongoose提供的schema/model/doc... 阅读全文
posted @ 2016-01-19 05:02 jayruan 阅读(2276) 评论(0) 推荐(0) 编辑
摘要: Person. find({ occupation: /host/, 'name.last': 'Ghost', age: { $gt: 17, $lt: 66 }, likes: { $in: ['vaporizing', 'talking'] } }). limit(10). sort({ oc... 阅读全文
posted @ 2016-01-19 03:56 jayruan 阅读(205) 评论(0) 推荐(0) 编辑
摘要: var mongoose = require('mongoose'), async = require('async');mongoose.connect('localhost', 'learn-mongoose');var User = mongoose.model('User', {name: ... 阅读全文
posted @ 2016-01-19 03:49 jayruan 阅读(646) 评论(0) 推荐(0) 编辑