随笔 - 326,  文章 - 0,  评论 - 0,  阅读 - 16万

随笔分类 -  nodeJs

四:路由器的简单使用
摘要:搭建用户路由器 概述,路由器的作用是将功能分类,比如将user下的所有功能,都放入user路由器下 举两个例子 用户路由器 localhost:8080/user/list /** * 请求的入口 */ const express = require("express"); const app = 阅读全文
posted @ 2021-06-08 19:36 文种玉 编辑
三.node.js中获取post请求的两种方式
摘要:方式一:通过绑定数据流data事件来获取 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name=" 阅读全文
posted @ 2021-06-08 18:50 文种玉 编辑
二.node.js中的get请求中常用的两种方式
摘要:const express = require("express"); const app = express(); app.listen(8080); /** * 请求方式一 * http://localhost:8080/reg?username=zhangsan&password=123456 阅读全文
posted @ 2021-06-08 18:35 文种玉 编辑
一.node.js中基本的响应信息
摘要:const express = require("express"); //创建服务器 var app = express(); //配置服务器的端口 app.listen(8080); app.get("/login",(req,res)=>{ //普通响应 // res.end("今天天气好晴朗 阅读全文
posted @ 2021-06-08 18:25 文种玉 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示