mirror of
https://github.com/zhigang1992/examples.git
synced 2026-01-12 22:47:03 +08:00
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.4 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.4...4.17.19) Signed-off-by: dependabot[bot] <support@github.com>
socket-io
How to use
Running the app
cdinto theappdirectory and runyarnornpm install- Open
appwithexpo start, try it out.
Running the server (optional)
cdinto thebackenddirectory and runyarnornpm install, then runyarn start- Install ngrok and run
ngrok http 3000and copy the https url that looks something like thishttps://f7333e87.ngrok.io. This is required because WebSockets require https. - Open
app/main.jsand change theSocketEndpointat the top of the file to point to your endpoint.
The idea behind the example
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.