Firebase: Deploy in No Time
I'm trying out this really cool service called Firebase and just wanted to do share it. I wish I had a referral bonus...
What is Firebase?
When I first heard about it, Firebase allowed you to store your apps data in the cloud with a simple a REST call. No need to figure out databases as it can store your data in hip NOSQL style. The still do that and more. Now, they also provide APIs to easily do authentication and deployments.
What's so special about Firebase deployments?
You have Heroku, Google App Engine, Docker, Amazon Web Services, DigitalOcean (which I do have a referral code) and tons of other technologies and services that allow you to do deployments. So what's different with Firebase?
- Scenario 1: Oh
- Scenario 2: I just found an app to build for myself and I just want to do something quick and dirty.
- Scenario 3: I don't really need my own database or heavy backend since all the services are available in REST API through another service.
If those scenarios sound familiar, you may find that the services and tools mentioned above don't make development and deployment automagical. Most of the time, you have to write a simple backend and then configure a server then proceed to do deployments. With the scenario above, what you just want to do is most likely host a simple static asset hosting.
Firebase does that and makes it easy. Sign-up, hit 1-3 commands and then you're done. Your app is deployed. It's infomercial easy.
One big advantage that made me actually try their service is the pricing. It's free. Forever. Or well, until you become the next Facebook. With the simple scenarios mentioned above, I don't need it to be the next Facebook. I just want to tinker with new technologies when I have some free time. Most platform-as-a-service don't offer a decent free tier or even any free tier at all.
If you do become the next Facebook and don't want to roll your own infra, Firebase also has nifty scaling resources so you can choose to just upgrade your plan. Cool.
Tips and Tricks
2/3 times, it works every time.
~How I Met Your Mother
As with most software, occasionally there are some issues. In this case, noticed a rare issue. Rare as in no stackoverflow article kind of rare.
Firebase deploy stuck on deployment:
If you are running
firebase deploy but it's stuck trying to upload, try this. In your project delete
firebase init but this time, instead of choosing a new firebase directory, select a pre-existing one. Suddenly it works. Magic.
Can't Authenticate: Already Authenticated Previously:
If you are troubleshooting something and decide to delete firebase and reinstall it, on some commands, maybe you need to
firebase login again. If you rerun that command, it opens the page where you can select authorize like during the first setup. This time, since you've done it before, it says it can't authorize because it's already authorized. Kinda makes sense until you realize, the
firebase-tools command line hasn't figured this out and tries to make you login again.
Go to your Google My Account > Apps then remove Firebase. Wait a few minutes. Make a sandwich. Go outside. Then go back inside then rerun
firebase login. This time though, open the link in a browser with no cache or cookies (IE Chrome incognito). Should magically work. I hope...
Disclaimer: Not sure if the above has any ill effects since I'm just testing a sample project in a firebase account with nothing in it. Use proper discretion.
Firebase seems pretty awesome. You should try it. I should get a referral bonus.