Skip to content

Sample code snippet for basic operation with firebase realtime db

Notifications You must be signed in to change notification settings

pcpratheesh/golang-firebase-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golang-firebase-example

This is a sample respository to learn how we can integrate firebase realtime db operations

before creating database

  • Goto firebase
  • Create new project
  • Project Overview -> Settings Icon -> Projct Settings -> Service Accounts -> Click on generate new private key
  • copy the private key file into project folder and renamed as serviceAccountKey.json

Steps to configure Firebase realtime db

  • Realtime database -> create database -> choose location -> select mode (locked mode / test mode)

  • It will redirect to another window and you can see the database url there.

    Choose a region for the database. Depending on your choice of region, the database namespace will be of the form <databaseName>.firebaseio.com or <databaseName>.<region>.firebasedatabase.app
    

run

gr main.go --db-url <firebase_realtime_db_url> --add
gr main.go --db-url <firebase_realtime_db_url> --update
gr main.go --db-url <firebase_realtime_db_url> --delete

About

Sample code snippet for basic operation with firebase realtime db

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages