我在 mac os high Sierra 上运行 vagrant/ubuntu 16.04。我已将端口转发和符号链接设置为awesome.local.com。基本的node.js Web应用程序运行完美,可以在指向awesome.local.com:3000的Mac chrome浏览器上查看
我想在这个环境中以同样的方式开发 firebase,并且能够设置 CLI 并正常登录。
浏览 Firebase Web Codelab:https://codelabs.developers.google.com/codelabs/firebase-web/index.html?index=..%2F..%2Findex#0 https://codelabs.developers.google.com/codelabs/firebase-web/index.html?index=..%2F..%2Findex#0
跑步时
$ firebase serve
看起来一切都在运行,没有错误(我进行了调试):
hosting: Local server: http://localhost:5000
当我转到浏览器并指向 Awesome.local.com:5000 时,我得到:
This site can’t be reached
awesome.locl.com refused to connect.
Search Google for awesome.local.com:5000
ERR_CONNECTION_REFUSED
我试过了:
感谢您对此的任何帮助。
如果你想跑步firebase serve
针对不同的主机和端口,请参阅 CLI 中的帮助:
$ firebase serve --help
Usage: serve [options]
start a local server for your static assets
Options:
-p, --port <port> the port on which to listen (default: 5000) (default: 5000)
-o, --host <host> the host on which to listen (default: localhost) (default: localhost)
--only <targets> only serve specified targets (valid targets are: functions, hosting)
--except <targets> serve all except specified targets (valid targets are: functions, hosting)
-h, --help output usage information
您可以更改它侦听的主机和端口-p
and -o
。默认情况下仅绑定到 localhost,除 127.0.0.1 之外的任何其他主机都无法访问该主机。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)