Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase cli serve cant access the project from different device

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.

Anyone knows what configuration/command it needs to forward port 5000 ? (different projects like creat-react-app works fine)

like image 451
iMMuNiTy Avatar asked Feb 13 '18 14:02

iMMuNiTy


2 Answers

firebase serve -o 0.0.0.0

The -o flag sets the host.

For more information, see Server Fault: What's the difference between IP address 0.0.0.0 and 127.0.0.1?

like image 155
Keith Avatar answered Nov 19 '22 09:11

Keith


With a local IP 192.168.0.10 I launched firebase serve -o 192.168.0.10 and it works perfectly on port 5000 from other device

In my javascript app : functions.useFunctionsEmulator('http://192.168.0.10:5000')

like image 2
Damien Romito Avatar answered Nov 19 '22 07:11

Damien Romito