This project provides a simple Python server that listens on port 8765 and supports:
- HTTP
GET - HTTP
POST - WebSocket connections
All comments and logs are written in English.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python server.pyGET /GET /healthPOST /echo
Example:
curl -X POST http://127.0.0.1:8765/echo \
-H "Content-Type: application/json" \
-d '{"command":"hello"}'Endpoint:
ws://127.0.0.1:8765/ws
If the client sends PING, the server responds with PONG.
Any other text is treated as a command and returned in JSON.