Skip to content

codedigest/adonis-firebase-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adonis-firebase-sdk

JavaScript Firebase SDK wrapper for Adonis JS

Install

npm install adonis-firebase-sdk --save

Usage

Create a file in app/config/firebase.js and paste the code below by replacing it's values where necessary:

'use strict'

/*
 |--------------------------------------------------------------------------
 | Firebase
 |--------------------------------------------------------------------------
 |
 | Provide details of firebase project
 |
 */

module.exports = {

  /*
   |--------------------------------------------------------------------------
   | API key
   |--------------------------------------------------------------------------
   */
  apiKey: "",
  /*
   |--------------------------------------------------------------------------
   | Auth
   |--------------------------------------------------------------------------
   */
  authDomain: "",
  /*
   |--------------------------------------------------------------------------
   | Database
   |--------------------------------------------------------------------------
   */
  databaseURL: "",
  /*
   |--------------------------------------------------------------------------
   | Hosting
   |--------------------------------------------------------------------------
   */
  storageBucket: ""

}

Also you need to add the provider to AdonisJS at app/bootstrap/app.js:

const providers = [
   ...
   'adonis-firebase-sdk/providers/FirebaseProvider'
]

then you can simply call it from within controllers etc:

const Firebase = use('Firebase')

About

Firebase SDK wrapper for AdonisJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published