fanout / django-eventstream

Server-Sent Events for Django
MIT License
650 stars 85 forks source link

*** connection lost, reconnecting... *** connected #10

Closed PhilippeTrounev closed 6 years ago

PhilippeTrounev commented 6 years ago

I am trying to integrate django-eventstream with my application. I took the chat example and put it in as a new app in my application under url "/chat/". I downloaded ngrok and ran it on port 8003 as this is where my application is.

Added 'django_eventstream',to installed apps added 'django_grip.GripMiddleware', as my middleware

Got my Grip URL and Event Stream URLS defined GRIP_URL = 'https://api.fanout.io/realm/"myid"?iss="myid"&key=base64:"mykey"' Set up a model storage class EVENTSTREAM_STORAGE_CLASS = 'django_eventstream.storage.DjangoModelStorage'

I also updated the ngrok origin to the origin returned to me when I ran ngrok.

Now when I launch the chat I keep getting this error. How do I go about troubleshooting this? connection lost, reconnecting... connected

Also I do not see anything on ngrok log.

Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00

Messages persist as they should. Am I missing anything in the configuration? As I am not sure where to look at next.

jkarneges commented 6 years ago

Hi there,

Be sure to open the browser to http://{realm-id}.fanoutcdn.com/chat/ rather than http://localhost:8003/chat/

PhilippeTrounev commented 6 years ago

Oh ok that makes sense. It works now. Thank you :)