Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Python HTTP + WebSocket Server

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.

Run

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python server.py

HTTP

  • GET /
  • GET /health
  • POST /echo

Example:

curl -X POST http://127.0.0.1:8765/echo \
  -H "Content-Type: application/json" \
  -d '{"command":"hello"}'

WebSocket

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.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages