firebase-hosting

Implementing localized 404 page with Firebase hosting

喜欢而已 提交于 2020-08-09 07:08:47
问题 Say my web app has two locales: English( myapp.com/en/ ) and French( myapp.com/fr/ ). I want to localize my 404 pages, so that request to myapp.com/en/non-existent or myapp.com/non-existent would return an English version of the 404 page and request to myapp.comm/fr/non-existent would return a French one. However, it seems like Firebase Hosting does not provide such functionality by default, as it only allows a single 404 page(source) So, is there a way of implementing a localized 404 page

Firebase hosting deploy to other site

我怕爱的太早我们不能终老 提交于 2020-08-07 03:48:32
问题 how to deploy to other firebase hosting sites defined within the same project. I created multiple firebase hosting "sites". The command firebase deploy however always deploys to the first one. How can I specify that the static files get deployed to another "site" (and domain). Thanks 回答1: You have to add the other sites as deploy targets. If you have a second site named awesome-site-d3426 : $ firebase target:apply hosting awesome-app awesome-site-d3426 You'll likely have to the same thing for

firebase deploy gives a “path” error

与世无争的帅哥 提交于 2020-08-06 07:50:47
问题 After initiating my firebase app with firebase init I tried to deploy it with firebase deploy but I get this error === Deploying to 'fugis-auto-services-website'... i deploying database, storage, functions, hosting Error: An unexpected error has occurred. So I looked at the firebase-debug.log and this is what it says Tue May 01 2018 19:52:19 GMT-0500 (CDT) [debug] [2018-05-02T00:52:19.967Z] <<< HTTP RESPONSE 200 [info] [info] === Deploying to 'fugis-auto-services-website'... [info] [info] i

What exactly is “source” in the context of Firebase rewrites?

落花浮王杯 提交于 2020-07-23 16:11:23
问题 I've read the Firebase documents and watched other tutorials multiple times and none of them explicitly explained what source was. so in Layman's terms, what exactly is source in the context of the code below? "hosting": { // ... // Add the "rewrites" attribute within "hosting" "rewrites": [ { "source": "/bigben", "function": "bigben" } ] } 回答1: By declaring a rewrite , as follows "rewrites": [ { "source": "/bigben", "function": "bigben" } ] you actually "direct hosting requests to your

What exactly is “source” in the context of Firebase rewrites?

早过忘川 提交于 2020-07-23 16:08:43
问题 I've read the Firebase documents and watched other tutorials multiple times and none of them explicitly explained what source was. so in Layman's terms, what exactly is source in the context of the code below? "hosting": { // ... // Add the "rewrites" attribute within "hosting" "rewrites": [ { "source": "/bigben", "function": "bigben" } ] } 回答1: By declaring a rewrite , as follows "rewrites": [ { "source": "/bigben", "function": "bigben" } ] you actually "direct hosting requests to your

What exactly is “source” in the context of Firebase rewrites?

前提是你 提交于 2020-07-23 16:05:51
问题 I've read the Firebase documents and watched other tutorials multiple times and none of them explicitly explained what source was. so in Layman's terms, what exactly is source in the context of the code below? "hosting": { // ... // Add the "rewrites" attribute within "hosting" "rewrites": [ { "source": "/bigben", "function": "bigben" } ] } 回答1: By declaring a rewrite , as follows "rewrites": [ { "source": "/bigben", "function": "bigben" } ] you actually "direct hosting requests to your

How to deploy next.js app on Firebase Hosting?

不想你离开。 提交于 2020-07-20 08:07:38
问题 I am trying to deploy next.js app on Firebase hosting. But I don't understand which files to push to the server. When I run npm run build and pushed the build folder to firebase. But gives error that No index.html file found. Here is the image of output of build folder. I have just created a simple component for testing purposes. Output of build command 回答1: On package.json you need to add npm scripts for building and exporting like. "scripts": { "dev": "next", "build": "next build", "start":

How to deploy next.js app on Firebase Hosting?

筅森魡賤 提交于 2020-07-20 08:07:38
问题 I am trying to deploy next.js app on Firebase hosting. But I don't understand which files to push to the server. When I run npm run build and pushed the build folder to firebase. But gives error that No index.html file found. Here is the image of output of build folder. I have just created a simple component for testing purposes. Output of build command 回答1: On package.json you need to add npm scripts for building and exporting like. "scripts": { "dev": "next", "build": "next build", "start":

Firebase hosting URL needs .html to display a page

半腔热情 提交于 2020-07-06 10:34:13
问题 I am trying to host a website at Google Firebase. The index.html is shown as (e.x.) app.firebase.com , but when I want to access a page like login.html I need to type app.firebase.com/login.html , just app.fire-base.com/login doesn't work. How would I achieve this for every .html file in the directory (public), do I need to configure the firebase.json ? I read the docs but I could not find any information. Here is my .json { "hosting": { "public": "public", "signin": "/signin.html" } } 回答1:

Firebase hosting URL needs .html to display a page

。_饼干妹妹 提交于 2020-07-06 10:34:06
问题 I am trying to host a website at Google Firebase. The index.html is shown as (e.x.) app.firebase.com , but when I want to access a page like login.html I need to type app.firebase.com/login.html , just app.fire-base.com/login doesn't work. How would I achieve this for every .html file in the directory (public), do I need to configure the firebase.json ? I read the docs but I could not find any information. Here is my .json { "hosting": { "public": "public", "signin": "/signin.html" } } 回答1: