Created Websocket usage (markdown)

Sef 2017-11-15 14:57:30 +03:00
parent be25753a7a
commit a35a9095c5
1 changed files with 23 additions and 0 deletions

23
Websocket-usage.md Normal file

@ -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