firebase-hosting

How to host nodeJS project to firebase?

﹥>﹥吖頭↗ 提交于 2019-12-02 22:30:15
I am using node, express and more other dependencies for the project. I wonder how to host this project on firebase. My project will have controller, view , and any other folders to make the project possible.It already has view engine like pug/handlebars. Tutorials online only show how to host firebase with single index.html in public folder. How am I suppose to host my project with all other folders? I know how to use firebase in nodeJS, but how to host the project on firebase? How firebase will access the server file(either app/index.js)? Where should I put all these folders? Hopefully I am

Firebase hosting + React with webpack

只谈情不闲聊 提交于 2019-12-02 19:36:23
Is there a way to add Firebase hosting to React project that utilizes webpack? Specifically, I am trying to add it to https://github.com/mxstbr/react-boilerplate This is my firebase.json file { "hosting": { "firebase": "name", "public": "app", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } When I call firebase serve the page is empty. However, if I do npm start the app works correctly. So, the JS/React code is not being injected into the index.html, which is <!DOCTYPE html> <html> <head> <meta charset="utf-8">

how to deploy vuejs/nodejs app in firebase hosting?

左心房为你撑大大i 提交于 2019-12-02 17:21:38
问题 My project structure client part contains vue app and server part contains nodejs. In client side handling api service which is created from server. Created api services inside client folder to get response from server. here is my structure of client-> services->api.js. here is client -> services -> api.js code: import axios from 'axios' export default() => { return axios.create({ baseURL: `https://dev-cloudthrifty-com.firebaseapp.com` // https://dev-cloudthrifty-com.firebaseapp.com/ // http:

How to access environment-specific Firebase Function endpoints from Firebase Hosted application?

梦想与她 提交于 2019-12-02 09:33:15
I have three Firebase projects representing Development, Staging and Production environments hosted on Firebase hosting. Each environment utilizes its own deployed Firebase functions like so: Dev function endpoint: https://us-central1-my-app-dev.cloudfunctions.net/someFunction Staging function endpoint: https://us-central1-my-app-staging.cloudfunctions.net/someFunction Production function endpoint: https://us-central1-my-app.cloudfunctions.net/someFunction I can't figure out how the static, Firebase-hosted client React application should invoke these functions because the URI endpoints of each

how to deploy vuejs/nodejs app in firebase hosting?

◇◆丶佛笑我妖孽 提交于 2019-12-02 09:18:06
My project structure client part contains vue app and server part contains nodejs. In client side handling api service which is created from server. Created api services inside client folder to get response from server. here is my structure of client-> services->api.js. here is client -> services -> api.js code: import axios from 'axios' export default() => { return axios.create({ baseURL: `https://dev-cloudthrifty-com.firebaseapp.com` // https://dev-cloudthrifty-com.firebaseapp.com/ // http://localhost:8081 }) } client -> vue.config.js configuration file. const path = require('path') module

Can firebase run 100% offline and sync up later?

拈花ヽ惹草 提交于 2019-12-02 08:59:34
问题 I need to build an application for mission work that runs 100% offline and then syncs up with the server when it reconnects to the internet. The application "currently" has over 6k people in the database that needs to be searchable when the missionaries are in the field. The challenge is that I need "all" of the data local and disconnected on multiple laptops or tablets. I know I can use a database like CouchDB but I would much prefer use firebase or something similar to keep the management

Firebase Deploy - “Unable to Authorize” error

心不动则不痛 提交于 2019-12-02 07:39:29
I tried to deploy a very simple site for a Firebase project I have set up, and followed the following steps: firebase login (I was already logged in since I have other projects I'm working on) firebase init (created the .firebaserc and database.rules.json files). firebase deploy On deploy, I keep getting the following error message: λ firebase deploy ! Your CLI authentication needs to be updated to take advantage of new features. ! Please run firebase login --reauth Error: Unable to authorize access to project [PROJECT NAME] I succesfully ran firebase login --reauth and I still get this.

Firebase Hosting - Members Only / Secured Webpages? [duplicate]

北城余情 提交于 2019-12-02 07:29:13
This question already has an answer here: Can Firebase hosting restrict access to resources? 2 answers I understand that there are Realtime Database Rules which can be configured to restrict access to data at multiple levels. That's great. What about hosting? Are 'Members Only' webpages secured exclusively by the Realtime Database Rules? In other words, the client side Javascript could look at the firebase.auth().currentUser; properties to determine what form , table , card , section , or whatever to switch from CSS display:none to display:inline , for example. However, the HTML is already

Socket.io Official Chat application not work on firebase

两盒软妹~` 提交于 2019-12-02 06:34:32
问题 I deploy the Socket.io Official Chat application on Firebase, but it always show https://.firebaseapp.com/socket.io/ [HTTP/1.1 404 Not Found] in the console. How to fix this problem?? And It works on my local machine http://localhost:3000 Should I change var http = require('http').Server(app); to var http = require('https').Server(app); Because Firebase Hosting is SSL-only. Any help would be much appreciated. Best Regards. 回答1: Firebase Hosting is for static assets only. You cannot run your

Firebase storage downloadURL file structure

╄→гoц情女王★ 提交于 2019-12-02 00:03:45
问题 So I'm using firebase storage to upload my website files. Here is an example of the directory structure: Project--------------------- |__index.html |__css |__style.css |__js |__mainScript.js So I'm uploading these files to firebase in this structure, but I notice that the downloadURL that's returned is not very friendly in preserving this structure.. For example, when I set the src of an iframe to the downloadURL for the index.html.. the iframe page is missing the style and mainScript files.