【文件属性】:
文件名称:socket-io-example
文件大小:42KB
文件格式:ZIP
更新时间:2021-05-30 04:51:53
JavaScript
socket-io-example
在 Expo 中使用 socket.io,查看实际效果: :
注意:需要 https
您需要为 Web 套接字服务器使用 https,因此我建议使用 ngrok。 说明在 app/main.js 中内联,但为了您的方便,也复制到这里:
// INSTRUCTIONS:
// replace with your local ngrok url, eg: https://brent123.ngrok.io
// start ngrok with ngrok http 3000 --subdomain=brent123
// where the subdomain is whatever subdomain you want
【文件预览】:
socket-io-example-master
----app()
--------.gitignore(38B)
--------.babelrc(130B)
--------package.json(354B)
--------main.js(1KB)
--------.DS_Store(6KB)
--------exp.json(712B)
--------yarn.lock(129KB)
----README.md(513B)
----backend()
--------.gitignore(14B)
--------package.json(325B)
--------index.js(409B)
--------index.html(21B)
--------yarn.lock(16KB)