Run the Chat example with Fanout Cloud
masterTo use Fanout Cloud for real-time streaming in this example, configure the GRIP_URL in your .env file using your realm credentials.
- Set
GRIP_URLin.env:GRIP_URL=https://api.fanout.io/realm/{realm-id}?iss={realm-id}&key=base64:{realm-key} - Use
ngrokto create a local tunnel:ngrok http 8000 - Run the specialized management command to link the tunnel to Fanout Cloud:
python manage.py runserver_ngrok
Requests to your Fanout Cloud domain (e.g., https://{realm-id}.fanoutcdn.com/) will be routed through the ngrok tunnel to your local server.
# In .env
GRIP_URL=https://api.fanout.io/realm/{realm-id}?iss={realm-id}&key=base64:{realm-key}
# In a separate shell
ngrok http 8000
# Run the server
python manage.py runserver_ngrok