摘要: mongoose模块: 阅读全文
posted @ 2016-12-16 21:03 prolog 阅读(255) 评论(0) 推荐(0) 编辑
摘要: cookie模块: 阅读全文
posted @ 2016-12-16 20:45 prolog 阅读(301) 评论(0) 推荐(0) 编辑
摘要: express模块: 中间件: 1 var express = require("express"); 2 var app = express(); 3 4 //中央发了100块钱 5 app.use(function (req,res,next) { 6 req.money = 100; 7 ne 阅读全文
posted @ 2016-12-16 20:40 prolog 阅读(269) 评论(0) 推荐(0) 编辑
摘要: http模块: 文件上传: html: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>post</title> 6 <link rel="stylesheet" href="post.c 阅读全文
posted @ 2016-12-16 20:17 prolog 阅读(212) 评论(0) 推荐(0) 编辑
摘要: path模块: 阅读全文
posted @ 2016-12-16 20:15 prolog 阅读(257) 评论(0) 推荐(0) 编辑
摘要: fs模块: fs(文件): 1 var fs = require("fs"); 2 //读取文件 3 fs.readFile("1.txt","utf8",function(err,data){ 4 if(err){ 5 return console.error(err); 6 } 7 // con 阅读全文
posted @ 2016-12-16 20:10 prolog 阅读(245) 评论(0) 推荐(0) 编辑
摘要: buffer: 阅读全文
posted @ 2016-12-16 20:09 prolog 阅读(391) 评论(0) 推荐(0) 编辑
摘要: events模块: 阅读全文
posted @ 2016-12-16 20:07 prolog 阅读(354) 评论(0) 推荐(0) 编辑
摘要: util模块: 1 var util = require("util"); 2 /* 3 * 1、实现继承 4 * 2、对象的序列化 5 * 3、检测数据类型 6 * */ 7 8 //实现继承 9 function Paa(){ 10 this.name = "zy"; 11 this.age = 阅读全文
posted @ 2016-12-16 19:58 prolog 阅读(186) 评论(0) 推荐(0) 编辑
摘要: node学习笔记目录:node01-创建服务器 node02-util node03-events node04-buffer node05-fs node06-path node07-http node08-express node09-cookie node10-mongoose 创建服务器: var http = require("http");//引入一个模块 var server ... 阅读全文
posted @ 2016-12-16 19:50 prolog 阅读(207) 评论(0) 推荐(0) 编辑