Open skluck opened 7 years ago
Started looking into poxa. pusher-js doesn't seem to allow you to configure a path for the connection only a hostname. I was able to get Poxa and php talking and got pusher-js working but only if using a different port than the main application.
http{
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
#different port for websockets
listen 8888;
server_name hal-3.localhost;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}
Since the current frontend is PHP-based and bad at real-time features - we need to use a different technology to make the frontend more responsive.
Poxa is a standalone websocket/pusher service that can handle sending and syncing events from the server side (PHP) to the client side (JS). It is API-compatible with pusher.com.
Data flow
VHOST/ws
to Poxa