I understand Firebase Hosting is for, well, Hosting code files.
However, is there a way that I can ignore certain dependencies during deployment, but have Firebase run an install (like bower install) of them when the deployed code hits the server?
I don't think you can run any further deployment tasks on server when deploying to Firebase storage.
I would use Gulp/Grunt build task which can run prior to deployment and replace all bower_dependencies with its CDN alternatives. This will save you some storage on the hosting as well as speed up your site a bit...
Alternatively you can use Gulp/Grunt to build your own dependecies from bower components which can be deployed to the server.
Related
I have a problem with a web hosting project. I created a new proyect in google firebase, and I executed the following commands:
C:\myproject>firebase init functions
C:\myproject>firebase deploy --only functions
But the site says this:
Site Not Found
Why am I seeing this?
There are a few potential reasons:
You haven't deployed an app yet.
You may have deployed an empty directory.
This is a custom domain, but we haven't finished setting it up yet.
How can I deploy my first app?
Refer to our hosting documentation to get started.
What could I do for show, at least, some text when an user go to my project url?
The way you now invoke the Firebase CLI, it will only deploy the Cloud Functions in your project. It will not deploy the web site. In fact, the way you've run it, it probably didn't even create a web site to deploy.
Initialize the project with:
firebase init
And answer the questions this shows.
If you want to deploy the web site, use:
firebase deploy --only hosting
More likely you should simply deploy everything to prevent running into this problem:
firebase deploy
I have problem with my application, which is normally working locally, but when I deploy it on Heroku, then it crashes.
My repo: https://github.com/gkucmierz/cors-proxy
If you search for:
node.js deploy to heroku
You will find that there are certain restrictions to uploading a node.js on heroku.
You should include an application.yml file.
You should include a procfile.
You should modify any interactions with databases to work with postgresql.
I hope I could help.
Is firebase serve, the development server for Firebase, just a plain vanilla web server that serves files over HTTP, or does it do something special for Firebase apps?
More specifically, is there any reason to use firebase serve in development if it's more convenient in my situation to use another development web server (e.g., webpack-dev-server or a local Apache or IIS)?
The firebase serve command in the Firebase CLI interprets the instructions in your firebase.json file and serves the web site based on those.
If you're using another local dev server, you'll have to make sure it follows the same rules. That's typically not hard, but it somewhat of a hassle to ensure the firebase.json and configuration of the dev server stay in sync.
I want to try the demo for polymerfire in firebase. To get it run locally I followed these steps. But what exact steps do I need to do to get it to run in firebase?
I figured firebase init and firebase deploy should be run but the browser only displays errors in the console. Must the polymer project be build in a certain way and what should the firebase "public" folder be?
All files from public folder will be deployed to your Firebase static web hosting, so you can access them though your Firebase hosting address like https://projectname-5gek53.firebaseapp.com/. This allows you to upload your web app.
You build your polymer app (I guess you need to run polymer build). You drag all files generated as production build to your public folder. Next, you run firebase deploy and after deployment process your app will be accessible from your hosting address as I mentioned above.
Edit: Polymerfire demo is actually not that simple to export, but I found a really nice tutorial step-by-step from Google Codelabs here is a link Build a Progressive Web App with Firebase, Polymerfire and Polymer Components
I just installed a new version of the polymer cli and Firebase cli. When I do a Polymer build, no build/bundled or build/unbundled is created.
I do get a build/default, which I can run with a firebase serve and a firebase deploy. So something has changed recently. just fyi
What is the proper way to deploy webapps on Heroku? I'm installing Moodle, but the same procedure should apply to e.g. Drupal or Wordpress. What I hace done is to unzip Moodle locally, then uploaded it using git to Heroku. When I then visit my site I get the option to install it and select the database, which works fine. The problem is that the install procedure saves information in the filesystem on the server, which gets overwritten next time I deploy my app. So what is the proper way of doing this?
You have to pre-configure your app with all of the database settings before you deploy to Heroku. So either do a fake "install" on your local environment, or manually edit your php config files.
As you've discovered, Heroku's filesystem is not persistent: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem.