mirror of
https://github.com/expo/examples.git
synced 2026-11-13 20:38:07 -10:00
This PR was automatically created by the [upgrade workflow](./.github/workflows/upgrade.yml). > ⚠️ Review the [job logs](https://github.com/expo/examples/actions/runs/28587793003) before merging Co-authored-by: amandeepmittal <[email protected]>
Socket IO Example
This example shows how to connect and interact with socket-io backends.
Launch your own
🚀 How to use
Running the app
- Run
yarnornpm install - Open
App.jsand change thesocketEndpointat the top of the file to point to your endpoint. - Open
appwithyarn startornpm run startto try it out.
Running the server
cdinto thebackenddirectory and runyarnornpm install, then runyarn startornpm run start- Install ngrok and run
ngrok http 3000and copy the https url that looks something like thishttps://f7333e87.ngrok.io.
📝 Notes
React Native provides a socket-io compatible WebSocket implementation, some people get tripped up on the https requirement so this example helps to clarify how you can get it running.