1.用户 ----》 vue cli (8080/80) ----> todos.jar (9000) -----〉mysql(3306)
2.RESTful架构 API(浏览器里的数据)
三,命令行
apt install mongodb-----------service mongodb status
安装 JDK: apt install openjdk-11-jdk-headless
端口 9000, PID 1725
访问:http://ip:9000/api/todos(阿里云没有开放9000端口,记得去阿里云官网开放)
3.user 资源
HTTP协议中包含了方法,方法表示对数据的操作
方法(操作) url(资源)
POST /user :创建一个新的User
GET /user :查询一个或多个User,返回集合或数组
GET /user /id :加载一个(路径中包含了标识)User
PUT /user/id :更新一个User
DELETE /user/id :删除一个User
4.下载postman 程序,熟悉 HTTP 网络通信
https://www.linuxcool.com/--------------linux命令大全
1.
2.
3.
4.
5.
6.
7.post /api/todos 创建
8.
9.
1.0.get /api/todos 查询所有
11.
12.GET /api/todos/123 返回加载一条记录
HTTP 请求方法 URL
数据状态的迁移(改变)
13.
14.
15.
16.
17.PUT /api/todos/id 修改
18.
19.
20.
21.
22.
-
ajax / XHR
-
XMLHttpRequest
23.
24.
25.
26.