Firebase没有运行index.html文件 [英] Firebase not running index.html file

查看:156
本文介绍了Firebase没有运行index.html文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个非常新的程序员,通过Firebase教程。我已经完成教程的步骤1-5( https:// codelabs。 developers.google.com/codelabs/firebase-web/#5 )。我已经添加了将Firebase添加到您的网络应用程序js代码到html文件,并设置了Firebase CLI。但是,当我运行Firebase服务器时,除了不显示index.html文件中的代码之外,其他所有东西似乎都起作用。



我在正确的目录中,我的控制台显示服务器正在监听: HTTP://本地主机:5000 。但是,在localhost 5000中,它显示了一个通用的欢迎使用Firebase主机:您已经看到了这一点,因为您已经成功设置了Firebase主机,现在是时候去创造一些非凡的东西了!而不是index.html文件中的应用程序界面代码。这是我的目录中唯一的html文件。这似乎是我失去了一些非常简单的东西。感谢您的帮助。

解决方案

我想出了我的答案。正在发布的index.html文件位于公开文件中,该文件是在firebase init阶段创建的。我把那个占位符html文件替换为我的应用程序的一个。


I'm a pretty new programmer going through the Firebase tutorial. I have gone through steps 1-5 of the tutorial (https://codelabs.developers.google.com/codelabs/firebase-web/#5). I've added the "Add Firebase to your web app" js code to the html file, and set up the Firebase CLI. However, when I run the firebase server, everything seems to work other than it is not showing the code from the index.html file.

I am in the right directory, and my console says "Server listening at: http://localhost:5000." But, at localhost 5000, it shows a generic "Welcome to Firebase Hosting: You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!" box rather than the app interface code in the index.html file. It is the only html file in my directory. It seems like I am missing something very simple. Thank you for your help.

解决方案

I figured out my answer. The index.html file that was being posted was in the "public" file, which was created during the "firebase init" stage. I replaced that placeholder html file with the one for my app.

这篇关于Firebase没有运行index.html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆