python
import asyncio
import websockets
async def handle_message(websocket, path):
async for message in websocket:
await websocket.send("Server received: " + message)
start_server = websockets.serve(handle_message, 'localhost', 8080)
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()
bash
pip install websockets