https://github.com/postor/http-logger-cli
a http logger cli
https://github.com/postor/http-logger-cli
Last synced: 2 months ago
JSON representation
a http logger cli
- Host: GitHub
- URL: https://github.com/postor/http-logger-cli
- Owner: postor
- License: mit
- Created: 2022-05-08T12:15:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T06:06:41.000Z (about 3 years ago)
- Last Synced: 2025-01-25T17:45:43.048Z (4 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# http-logger-cli
a http logger cli for easy debugging | 用于调试的 http 请求日志服务## usage | 使用
```
npx http-logger-cli// or
npm i http-logger-cli -g
http-logger-cli
```default port 3000, to change port use ENV | 默认 3000 端口服务,修改端口使用环境变量
```
PORT=3001 http-logger-cli// or
cross-env PORT=3001 http-logger-cli
```## mock
default return json `{}`, to mock api, just put files with extension `json/txt/html` to relative path under `CWD`
默认返回 json `{}`,要 mock 接口的话只需将 `json/txt/html` 文件放到 `CWD` 下的对应目录即可
```
// example|示例CWD/api/info.json => /api/info
```