paint-brush
[Nodejs] Setup Firebase in 4 stepby@peterchang_82818
60,373 reads
60,373 reads

[Nodejs] Setup Firebase in 4 step

by April 6th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The service provides application developers an API that allows application data to be synchronized across clients and stored on <strong>Firebase’s</strong> cloud.

Company Mentioned

Mention Thumbnail
featured image - [Nodejs] Setup Firebase in 4 step
 HackerNoon profile picture

Firebase provides a realtime database and backend as a service.

Sound like a good plan to me, a lazy coder

The service provides application developers an API that allows application data to be synchronized across clients and stored on Firebase’s cloud.

1- Creating an Firebase application

Creating an Firebase application by a click on https://console.firebase.google.com/

2- Get service account key

After you click the Generate New Private Key button, a JSON file containing your service account’s credentials will be downloaded. You’ll need this to initialize the SDK in the next step.

To read more: https://firebase.google.com/docs/admin/setup

3- Setup Node.js project

Setting up Node.js application for Firebase project is easy, just install firebase-admin and putting the service key .json on the right path, done.

Github Example: https://github.com/wahengchang/nodejs-firebase-example

Readmore : https://firebase.google.com/docs/admin/setup

Extra: creating a new data for the project

First, create a database reference to your user data. Then use set() / setValue() to save a user object to the database with the user’s username, full name, and birthday.

Readmore: https://firebase.google.com/docs/database/admin/save-data

$ node app.js

Reference:

https://github.com/wahengchang/nodejs-firebase-example

— https://firebase.google.com/docs/admin/setup

https://firebase.google.com/docs/database/admin/save-data