且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firebase托管问题

更新时间:2023-02-26 19:42:22

Firebase托管是托管静态资产的服务,例如静态网站.静态网站的根目录通常是firebase deploy命令检查的index.html页面.

Firebase Hosting is a service for hosting static assets, e.g. a static web site. The root of a static web site is normally an index.html page, which the firebase deploy command checks for.

Jade (来自我对该主题的快速研究")是一个节点模板引擎.这意味着它在node.js进程内运行.运行Firebase托管的CDN服务器不会向您的站点公开node.js API.

Jade (from my quick "research" on the topic) is a node template engine. This means that it runs inside a node.js process. The CDN servers that Firebase Hosting runs on, do not expose a node.js API to your site.

因此,您不能直接在Firebase Hosting上运行Jade模板支持的网站. Jade命令行工具具有将Jade模板转换为常规HTML的命令(例如$ jade < my.jade > my.html ),然后可以将其部署到Firebase Hosting.

So you cannot run a Jade template powered web site directly on Firebase Hosting. The Jade command line tool has commands to convert your Jade templates into regular HTML (e.g. $ jade < my.jade > my.html), which you can then deploy to Firebase Hosting.