Firebase CLI服务无法从其他设备访问项目 [英] firebase cli serve cant access the project from different device
问题描述
我已经安装了firebase cli等.我可以启动项目并使用Firebase服务进行开发.我可以通过localhost:5000访问该项目的页面,但是如果我尝试从网络(移动电话)中的其他设备访问network-ip:5000,则会拒绝连接.
I have install firebase cli etcetc. I can start the project and develop using firebase serve. I can visit the page of the project through localhost:5000 but if i try from different device in my network (mobile phone) to access network-ip:5000 I get connection refused.
任何人都知道转发端口5000需要什么配置/命令? (诸如creat-react-app之类的不同项目效果很好)
Anyone knows what configuration/command it needs to forward port 5000 ? (different projects like creat-react-app works fine)
推荐答案
firebase serve -o 0.0.0.0
-o
标志设置主机.
For more information, see Server Fault: What's the difference between IP address 0.0.0.0 and 127.0.0.1?
这篇关于Firebase CLI服务无法从其他设备访问项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!