使用Egg.js编写RestfulAPI接口(四)使用PostMain测试Api接口
1.安装PostMain测试工具(略)
2.确保web工程已经启动成功
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\SYJ>cd egg-example C:\Users\SYJ\egg-example>npm run dev > example@1.0.0 dev C:\Users\SYJ\egg-example > egg-bin dev [egg-ts-helper] create typings\app\controller\index.d.ts (6ms) [egg-ts-helper] create typings\config\index.d.ts (41ms) [egg-ts-helper] create typings\config\plugin.d.ts (8ms) [egg-ts-helper] create typings\app\index.d.ts (2ms) 2021-02-25 15:10:50,979 INFO 9164 [master] node version v10.15.0 2021-02-25 15:10:50,981 INFO 9164 [master] egg version 2.29.3 2021-02-25 15:10:52,999 INFO 9164 [master] agent_worker#1:9424 started (2013ms) 2021-02-25 15:10:55,227 INFO 9164 [master] egg started on http://127.0.0.1:7001 (4246ms)
3.测试添加用户接口
4.测试查询用户列表接口
5.测试根据id查询用户信息接口
-------结束。