Node.js apps on Firebase Hosting Crash Course - Firecasts

By: Firebase

688   9   26862

Uploaded on 08/01/2017

Node apps are here on Firebase Hosting. David takes you through getting set up and shares some performance and development tips along the way.

See the official documentation: https://goo.gl/k3iv33

Add the Firecasts playlist! https://goo.gl/n2XqG1
Subscribe to the Firebase Channel: https://goo.gl/9giPHG
Music by http://terramonk.com

Comments (7):

By pier25    2017-11-04

Eh, he could also use Firebase functions to accomplish that and again for free with CDN without worrying about scaling issues.

https://www.youtube.com/watch?v=LOeioOKUKI8

Original Thread

By anonymous    2017-09-20

(Update: Now the answer is: Yes, you can - see updates below)

Original answer

No, you can't. Firebase hosting is only for static content.

See: https://firebase.google.com/docs/hosting/

Firebase Hosting provides fast and secure static hosting for your web app.

You need either a service like Heroku that can run your Node app, or you need your own server where you will install Node and run your app.

Update

Now you can host your Node apps on Firebase directly - thanks to Ayyappa for pointing it out in the comments.

See this excellent video tutorial:

and the documentation:

Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. Your code is stored in Google's cloud and runs in a managed environment. There's no need to manage and scale your own servers.

Note that this is still in Beta:

This is a Beta release of Google Cloud Functions. This API might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.

Original Thread

By anonymous    2017-09-20

You're in luck. Firebase just this week released a video that walks step-by-step through setting up an Node.js/Express app on Firebase Hosting.

This has only been possible since the integration of Cloud Functions with Firebase Hosting, which was released at I/O 2017. Most tutorials likely are from before that time, when there was no way to run server-side code on Firebase Hosting.

Original Thread

By anonymous    2017-11-20

You could create your own API with Firebase Functions and make that API do the requests to the 3rd party API and cache the results for 'x' time or write them to your Firebase Database using the Admin SDK.

Then your users will be able to fetch that data directly from your database without ever touching the 3rd party API.

Here you have a videotutorial from Firebase on how to create a Node.js app (hosting and functions). Functions section of the video is what you are looking for.

Hope it helps! :)

Original Thread

By anonymous    2018-01-01

Should help https://www.youtube.com/watch?v=LOeioOKUKI8

Original Thread

Recommended Books

    Submit Your Video

    If you have some great dev videos to share, please fill out this form.