Building web app using Firebase - Part 2 (Create API and Read Write DB)
Our First Web App Using Firebase Continuing from the previous post, which is only just one time only setup, let's further advance on doing the codes. After the Realtime database is ready and you have created a document, we need to develop the code. Just create a typical Node-js project as described below: Write our first Firebase function After you created the document you followed from the previous post, you already have the read and write API to your document. For example, you will be able to read your "user_detail" document using HTTP GET Request to "https://[PROJECT_ID].firebaseio.com/user_detail.json" . More on using Rest API can be read here https://firebase.google.com/docs/reference/rest/database . Although Firebase RealtimeDB has its Rest API implementations, sometimes, When we need some underlying logic for our app, we need to create an API. But here's just an example of how to create a simple API using firebase functions. 1. On your project, initia...