Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

loopsocial/ex_firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExFirebase

Firebase Admin SDK in Elixir

Documentation

Installation

Install from Hex

def deps do
 [{:ex_firebase, "~> 0.2.0"}]
end

Or install from GitHub

def deps do
  [{:ex_firebase, github: "loopsocial/ex_firebase", branch: "master"}]
end

Run mix deps.get

Configuration

Setup Firebase and generate a private key for your service account

Add your Firebase Project ID and service account key path to your config/config.exs file:

config :ex_firebase,
  project_id: "your-project-id",
  service_account_path: "/path/to/your/key.json",
  queue_interval: 1000, # frequency in ms queued messages are sent
  queue_batch_size: 10 # number of messages sent per queue_interval

Instead of specifying a file with service_account_path, you can set the following variables:

config :ex_firebase,
  private_key: System.get_env("FIREBASE_PRIVATE_KEY"),
  client_email: System.get_env("FIREBASE_CLIENT_EMAIL")

Supported Features

License

MIT. See LICENSE file in repository.

FirebaseTM is trademark of Google LLC.

Releases

No releases published

Packages

No packages published

Languages