mirror of
https://github.com/Mint-System/VarLog.git
synced 2026-04-23 23:33:45 -06:00
VarLog is a simple mock HTTP service written in Rust that logs all incoming HTTP requests.
- Rust 69.6%
- Shell 25.7%
- Dockerfile 4.7%
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
| task | ||
VarLog
VarLog is a simple mock HTTP service written in Rust that logs all incoming HTTP requests.
- 🌐 Accepts all HTTP methods (GET, POST, PUT, DELETE, etc.)
- ✅ Returns HTTP 200 OK for every request
- 📝 Logs request details (method, path, headers, body, timestamp)
- 🖥️ Provides a web UI to view and download request logs
- 🔄 Outputs request information to the console in real-time
- 💾 Stores all requests in a text file for persistence
Requirements
- Docker
- Rust
- Optional: bash/zsh alias
task='./task'with completion
Usage
Clone the repo.
git clone git@github.com:Mint-System/VarLog.git
cd VarLog
Run the rust app.
task run
This will start the service at http://127.0.0.1:8080.
Interact with VarLog
You can send any HTTP request to any path on the server:
curl http://127.0.0.1:8080/any/path
curl -X POST http://127.0.0.1:8080/api/data -d '{"key": "value"}'
curl -X PUT http://127.0.0.1:8080/resource/123 -d '{"status": "updated"}'
curl -X DELETE http://127.0.0.1:8080/resource/123
To view the received requests visit http://127.0.0.1:8080/ui in your browser.
You can also get the received requests from the api endpoint.
curl http://127.0.0.1:8080/api
Develop
Container image
Build the image.
task build
Run the container.
task start
Publish the container.
task publish