firebase-hosting

Can python/flask websites be hosted on firebase?

守給你的承諾、 提交于 2019-11-27 07:24:27
问题 I have a website that uses python/flask, and I know that firebase hosting is only for static websites, but I need to be able to use firebase cloud functions in my app, and that requires firebase hosting (please correct me if I am wrong). As node js is server side, but you can use it with firebase hosting, I was hopeful that there might be a way to use python too. Otherwise, if there is a way to use cloud functions without firebase hosting, you can tell me about that too. 回答1: You don't need

Upload rails app to firebase

↘锁芯ラ 提交于 2019-11-27 07:15:14
问题 I was wondering if there is a way to upload a rails app to firebase? If so can someone tell me how I can't seem to do it. I've tried altering the firebase.json file for my public path from "." to "app/views/pages" and try to deploy but a message keeps displaying that "can't find index.html in your public folder." If anyone can shed some light on this thanks in advance. 回答1: Firebase hosting is a product to serve so-called static application, which consist only of files that the client

Firebase Hosting set up issue

淺唱寂寞╮ 提交于 2019-11-27 06:03:32
问题 I'm just trying to do a simple set-up for hosting on firebase. I'm following the instructions at (https://www.firebase.com/docs/hosting/guide/deploying.html) but I'm missing something because I keep getting an error of: 'firebase' is not recognized as an internal or external command, operable program, or batch file." What I've done: Installed nodejs. Set PATH = to C:\Program Files\nodejs; via control Panel in cmd: cd C:\Program Files\nodejs npm install -g firebase-tools changed directory to

firebase cloud function won't store cookie named other than “__session”

房东的猫 提交于 2019-11-27 04:39:28
i followed the sample of authorized-https-endpoint and only added console.log to print the req.cookies, the problem is the cookies are always empty {} I set the cookies using client JS calls and they do save but from some reason, I can't get them on the server side. here is the full code of index.js, it's exactly the same as the sample: 'use strict'; const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); const express = require('express'); const cookieParser = require('cookie-parser')(); const cors = require(

Angular 6.0 firebase hosting deploy not working

旧街凉风 提交于 2019-11-27 04:23:56
I am looking for a tutorial on how to properly setup the firebase-tools hosting on my angular 6.0 projects, and what I found is always like this. - firebase init - then select the Hosting - What do you want to use as your public directory? dist - Configure as a single-page app (rewrite all urls to /index.html)? Yes - Overwrite? No - ng build --prod - firebase deploy but after doing this, this is always what I've got. I found that the ng build --prod will create a dist and an another subfolder under this where the project location is. dist |--TheProject_Folder | |--assets|index.html - This

Is it possible to create a new Firebase project by API?

会有一股神秘感。 提交于 2019-11-26 21:00:37
Is it possible to create new hosting projects by API, or another non-interactive method on Google Firebase? I already tried Firebase tools with a token, but it says that it is only possible to create a new project on Firebase Console. Some context : My project allows users to create static websites online and we are searching for solutions to host these sites. Firebase would be a great solution, but only if I could integrate the user's new project into my system, with Firebase projects. Updated (2018-11-07) It is now possible to create with the Firebase Management API . Through this same API

When I refresh my website I get a 404. This is with Angular2 and firebase

删除回忆录丶 提交于 2019-11-26 17:44:40
When I refresh my website I get a 404. This is with Angular2, typescript and firebase. I've deployed to firebaseapp with my Angular2 app. Routes seem to change fine but when I refresh the browser it redirects me to 404 page. When I refresh locally this doesn't happen. Am I missing any route settings or Firebase settings? This is my firebase.json file: { "firebase": "test", "public": "src", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ] } For Firebase Hosting the documentation on redirects and rewrites is here: https://www.firebase.com/docs/hosting/guide/url-redirects-rewrites

Firebase Hosting with dynamic cloud functions rewrites

守給你的承諾、 提交于 2019-11-26 17:41:28
问题 I have an express.js based cloud functions app on firebase in a function named api . To use a custom domain, I'm trying to use Firebase Hosting rewrites to route the specific URL to the function. I'm following the official documentation about cloud functions and Firebase hosting here, https://firebase.google.com/docs/hosting/functions, and have tried many combinations including the following: "rewrites": [ { "source": "/api/**", "function": "api" } ] "rewrites": [ { "source": "/api/:path1/

Firebase code pull

空扰寡人 提交于 2019-11-26 16:32:29
I need to pull down my code from a firebase hosted site, I created a site this past summer and no longer have the code locally on my laptop. I would like to recode some of the pieces, but don't have the source code anymore (other than the javascript and css I can glean from the served pages). I can't find a way to get the code from the firebase site, does anyone have any ideas? Kato There is no method available to grab your Firebase code. You should be utilizing your own version control (e.g. git) to manage your revisions and backups. Since all your files are static assets, you could always

Firebase hosting with multiple directories at multiple domains

无人久伴 提交于 2019-11-26 16:24:33
问题 I have the following setup and wanted to know how to best configure Firebase hosting I have a repo with the /build directory with three subdirectories: /build/a /build/b /build/c I'd like to serve each directory at its own domain (or domain) in both prod and dev like: /a Prod: foo.com and www.foo.com Dev: dev.foo.com /b Prod: b.foo.com Dev: b.dev.foo.com /c Prod: c.foo.com Dev: c.dev.foo.com It seems like the only way to do this is to create a separate Firebase project for each deployed