From bb88fd46ecb3c552a8d3da4381b8f0e7e94e1290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=97=E6=B6=A6=E6=B3=BD?= <1429679535@qq.com> Date: Sun, 19 Feb 2023 13:00:59 +0800 Subject: [PATCH] 15 --- ...46\347\254\254\344\270\200\350\257\276.md" | 0 ...22\344\270\216\346\250\241\345\235\227.md" | 0 .../2023-02-16go\350\257\273\345\206\231.md" | 0 .../2023-02-17http.md" | 22 +++++++++++++++++++ 4 files changed, 22 insertions(+) rename "nodeJs\347\254\224\350\256\260/2023-02-13\345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" => "\350\213\227\346\266\246\346\263\275/2023-02-13\345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" (100%) rename "nodeJs\347\254\224\350\256\260/2023-02-15\344\272\244\344\272\222\344\270\216\346\250\241\345\235\227.md" => "\350\213\227\346\266\246\346\263\275/2023-02-15\344\272\244\344\272\222\344\270\216\346\250\241\345\235\227.md" (100%) rename "nodeJs\347\254\224\350\256\260/2023-02-16go\350\257\273\345\206\231.md" => "\350\213\227\346\266\246\346\263\275/2023-02-16go\350\257\273\345\206\231.md" (100%) create mode 100644 "\350\213\227\346\266\246\346\263\275/2023-02-17http.md" diff --git "a/nodeJs\347\254\224\350\256\260/2023-02-13\345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" "b/\350\213\227\346\266\246\346\263\275/2023-02-13\345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" similarity index 100% rename from "nodeJs\347\254\224\350\256\260/2023-02-13\345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" rename to "\350\213\227\346\266\246\346\263\275/2023-02-13\345\274\200\345\255\246\347\254\254\344\270\200\350\257\276.md" diff --git "a/nodeJs\347\254\224\350\256\260/2023-02-15\344\272\244\344\272\222\344\270\216\346\250\241\345\235\227.md" "b/\350\213\227\346\266\246\346\263\275/2023-02-15\344\272\244\344\272\222\344\270\216\346\250\241\345\235\227.md" similarity index 100% rename from "nodeJs\347\254\224\350\256\260/2023-02-15\344\272\244\344\272\222\344\270\216\346\250\241\345\235\227.md" rename to "\350\213\227\346\266\246\346\263\275/2023-02-15\344\272\244\344\272\222\344\270\216\346\250\241\345\235\227.md" diff --git "a/nodeJs\347\254\224\350\256\260/2023-02-16go\350\257\273\345\206\231.md" "b/\350\213\227\346\266\246\346\263\275/2023-02-16go\350\257\273\345\206\231.md" similarity index 100% rename from "nodeJs\347\254\224\350\256\260/2023-02-16go\350\257\273\345\206\231.md" rename to "\350\213\227\346\266\246\346\263\275/2023-02-16go\350\257\273\345\206\231.md" diff --git "a/\350\213\227\346\266\246\346\263\275/2023-02-17http.md" "b/\350\213\227\346\266\246\346\263\275/2023-02-17http.md" new file mode 100644 index 0000000..6dd40b1 --- /dev/null +++ "b/\350\213\227\346\266\246\346\263\275/2023-02-17http.md" @@ -0,0 +1,22 @@ +# http模块 +```js +http协议 +1、http协议为请求/响应的协议 2、http协议常见方法有:get、post、put、delete、options。 3、http的端口号是80 4、默认的http是不安全的,是明文的 5、后面新增加https是安全的,加密的 6、wedsocket简称ws是即时通信协议,其实也是基于http协议 +``` +```js +http服务器 + //1、创建http模板 + let http = require('http'); + + //2、创建http服务 + letApp= http.createserver((cre.res)=>{ + console.log("cre"); + console.log("res"); + }) + + //3、监听 + app.listen(80); + + //4、测试 网页访问 + locahost:端口号 + ``` \ No newline at end of file -- Gitee