1.安装nodejs 用node --version查看版本
2.连接数据库 xmysql -h 211.149.163.145 -u
3.postman中请求设置为http://localhost:3000/api/username localhost:3000 为步骤2连接后的API's base URL的值,username为数据库对应的表
- 查询整张表:http://localhost:3000/api/表名
- 单表操作需要加查询条件:http://localhost:3000/api/表名?_where=(u_phone,eq,13058123238) eq的意思是等于
image.png - 多条件查询:http://localhost:3000/api/表名?_where=(u_phone,eq,13058123238) ~and(u_user_id,eq,309)
image.png - 根据指定条件进行排序
-表示降序
http://localhost:3000/api/表名?_sort=u_user_id
image.png - 分页查询
_size = n
http://localhost:3000/api/表名?_sort=u_user_id&_size = 2
image.png
比较表达式:

image.png



