1.0.2 • Published 7 years ago

adonis-firebase-sdk v1.0.2

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

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')
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago