Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pcpratheesh/golang-firebase-example
Sample code snippet for basic operation with firebase realtime db
https://github.com/pcpratheesh/golang-firebase-example
code database firebase firebase-database golang real-time sample snippets
Last synced: 3 days ago
JSON representation
Sample code snippet for basic operation with firebase realtime db
- Host: GitHub
- URL: https://github.com/pcpratheesh/golang-firebase-example
- Owner: pcpratheesh
- Created: 2021-09-07T09:19:42.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-13T03:22:46.000Z (about 3 years ago)
- Last Synced: 2024-06-21T18:09:56.516Z (5 months ago)
- Topics: code, database, firebase, firebase-database, golang, real-time, sample, snippets
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# golang-firebase-example
This is a sample respository to learn how we can integrate firebase realtime db operations
## before creating database
- Goto [firebase](https://console.firebase.google.com/)
- 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 .firebaseio.com or ..firebasedatabase.app
```## run
```go
gr main.go --db-url --add
gr main.go --db-url --update
gr main.go --db-url --delete
```