在 Linux 上调试服务的核心思路
安装与启动 Postman
sudo tar -xzf Postman-linux-x64-*.tar.gz -C /optsudo ln -s /opt/Postman/Postman /usr/bin/postmanpostman调试步骤与常用功能
pm.test("Status is 200", () => pm.response.to.have.status(200));
pm.test("Response is JSON", () => pm.response.to.be.json);
命令行与自动化
npm install -g newmannewman run collection.json -e env.json -r cli,json常见故障排查清单
curl -v http://127.0.0.1:3000/healthcurl -v http://<服务器IP>:<端口>/health