adonis-firebase-admin-updated
v1.1.3
Published
Firebase for AdonisJS
Downloads
3
Maintainers
Readme
adonis-firebase-admin
Firebase client and admin providers for AdonisJS
Install
adonis install adonis-firebase-admin
You need to add the provider to AdonisJS at start/app.js
:
const providers = [
...
'adonis-firebase-admin/providers/Firebase',
'adonis-firebase-admin/providers/FirebaseAdmin'
];
and in your .env
file
FIREBASE_CREDENTIAL_TYPE=
FIREBASE_CREDENTIAL_PROJECT_ID=
FIREBASE_CREDENTIAL_PRIVATE_KEY_ID=
FIREBASE_CREDENTIAL_PRIVATE_KEY=
FIREBASE_CREDENTIAL_CLIENT_EMAIL=
FIREBASE_CREDENTIAL_CLIENT_ID=
FIREBASE_CREDENTIAL_AUTH_URI=
FIREBASE_CREDENTIAL_TOKEN_URI=
FIREBASE_CREDENTIAL_AUTH_PROVIDER=
FIREBASE_CREDENTIAL_CLIENT=
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_DATABASE_URL=
FIREBASE_STORAGE_BUCKET=
then you can simply call it from within controllers etc:
const Firebase = use('Perafan/Firebase');
const FirebaseAdmin = use('Perafan/FirebaseAdmin');