diff --git "a/\346\236\227\347\217\212/web\346\234\215\345\212\241\345\231\250/html/ljy.html" "b/\346\236\227\347\217\212/web\346\234\215\345\212\241\345\231\250/html/ljy.html" new file mode 100644 index 0000000000000000000000000000000000000000..42d559737b33f396b44e5d4084a6d2c4f189637b --- /dev/null +++ "b/\346\236\227\347\217\212/web\346\234\215\345\212\241\345\231\250/html/ljy.html" @@ -0,0 +1,41 @@ + + +
+ + + +李
+靖
+殷
+是
+臭
+猪
+
+
+
\ No newline at end of file
diff --git "a/\346\236\227\347\217\212/web\346\234\215\345\212\241\345\231\250/ls.js" "b/\346\236\227\347\217\212/web\346\234\215\345\212\241\345\231\250/ls.js"
new file mode 100644
index 0000000000000000000000000000000000000000..4a41c0435006300a877578707b30ecba545abe58
--- /dev/null
+++ "b/\346\236\227\347\217\212/web\346\234\215\345\212\241\345\231\250/ls.js"
@@ -0,0 +1,28 @@
+// 课堂笔记看懂,搭建一个web服务器,针对不同的参数,给予不同的回应,把html文件用异步方式去读取,返回.再去试下用orm框架去操作数据给不同参数返回不同的数据.
+let http = require("http"); // 导入http模块
+let fs = require("fs"); //导入fs模块
+
+var server = http.createServer(function (request, response) { // 创建http sever,并传入回调函数,回调函数接受request和response对象
+
+ console.log(request.method + ":" + request.url); // 获得http请求的method和url,method是请求方式,url是除了域名和端口的网址
+
+ // 将http响应200写入response,同时设置Content-Type:rext/html,设置编码为utf-8
+ response.writeHead(200, {'Content-Type' : 'text/html; charset=utf-8'});
+ // response.end('