Sanic - SocketIO startup kit.
Clone the repo, followup the steps:
-
Configure database and server host settings in
webconsole/main/settings.py -
pip install -r requirements- Installs required python packages -
python manage.py migrate- Updates database schema -
To start server run
python manage.py runserver
Open http://localhost:8000 to view webconsole
Note:
You may need to install mysql/sqlite3 server depends on database that you are using.
Pull docker image
docker pull rajez/opensocket:beta
Run
docker run -dti -p 8000:8000 --name opensocket rajez/opensocket:beta
Open http://localhost:8000 to view webconsole
You may modify socket authentication in socketplay/connection/authentication.py
Define websocket event in directory socketplay/events
Define namespaces in directory socketplay/namespaces
Define rooms in directory socketplay/rooms
Note: webconsole page implementation is in progress.
python-sokcetio - Example implementations of python-socketio for various deployment methods
sanic-starter - sanic starter with alembic migration
