摘要: 转载 http://www.jb51.net/article/49024.htm 阅读全文
posted @ 2016-02-16 10:34 monica_guorong 阅读(109) 评论(0) 推荐(0) 编辑
摘要: var mongoose =require('mongoose');var db = mongoose.connect("mongodb://localhost:27001/test");//本地库test 数据库 var testSchem = new mongoose.Schema({ name 阅读全文
posted @ 2016-02-01 15:38 monica_guorong 阅读(191) 评论(0) 推荐(0) 编辑
摘要: http://www.htmleaf.com/jQuery/Menu-Navigation/201501031079.html 阅读全文
posted @ 2016-01-22 09:58 monica_guorong 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Node.js 文件系统(fs 模块)模块中的方法均有异步和同步版本,例如读取文件内容的函数有异步的 fs.readFile() 和同步的 fs.readFileSync()。var fs = require("fs");// 异步读取fs.readFile('input.txt', functio... 阅读全文
posted @ 2016-01-21 11:16 monica_guorong 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 从流中读取数据创建 main.js 文件, 代码如下:var fs = require("fs");var data = '';// 创建可读流var readerStream = fs.createReadStream('input.txt');// 设置编码为 utf8。readerStream... 阅读全文
posted @ 2016-01-21 11:10 monica_guorong 阅读(173) 评论(0) 推荐(0) 编辑
摘要: http://www.expressjs.com.cn/guide/migrating-4.html#overview 阅读全文
posted @ 2015-12-29 22:42 monica_guorong 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 启动数据mongodb 创建数据 use mongodbtest => db.user.insert({"name":"eason","age":23,"sex":true})=>可以查看下 有没有数据成功插入 db.user.find().pretty()nodejs 新建一个nodejstest... 阅读全文
posted @ 2015-12-29 15:01 monica_guorong 阅读(1116) 评论(0) 推荐(0) 编辑
摘要: http://www.51testing.com/html/89/202089-868262.html 阅读全文
posted @ 2015-12-28 16:42 monica_guorong 阅读(110) 评论(0) 推荐(0) 编辑
摘要: http://www.it165.net/database/html/201506/12583.html 阅读全文
posted @ 2015-12-27 15:12 monica_guorong 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 这个问题是因为最新express4.0版本中将命令工具分家出来了,所以我们还需要安装一个命令工具,命令如下:npm install -g express-generator 阅读全文
posted @ 2015-12-17 23:29 monica_guorong 阅读(110) 评论(0) 推荐(0) 编辑