diff --git a/Websocket-usage.md b/Websocket-usage.md new file mode 100644 index 0000000..263f17d --- /dev/null +++ b/Websocket-usage.md @@ -0,0 +1,23 @@ +We use websocket in our project. For now on its only in the wall, however feel free to use it anywhere in the project where its actually applicable. + +## General information +On frontend, you can use autobahn.js or whatever you want to communicate to websocket. +On backend, you can use [Ratchet](http://socketo.me/) as its already installed in the project. + +## NGINX config +` +location /ws/ { + proxy_pass http://127.0.0.1:8080; + proxy_read_timeout 1200s; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; +} +` + +## Wall usage +In wall, we use it to have real time updates on: +* new messages +* edited messages +* deleted messages +* blocked messages