Created
February 16, 2020 10:46
-
-
Save sadeghianme/0b1a498345847bc9b3f67241e0ee9dc3 to your computer and use it in GitHub Desktop.
SailsJs v1.2.3 use FirebaseWaterline Adapter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I installed the blow link for using firebase in sails js but got this error: npm install sails-firebase --save | |
in datastores.js: | |
module.exports.datastores = { | |
default: { | |
adapter: 'sails-mongo', | |
url: 'mongodb://localhost:27017/dashboard-auth' | |
}, | |
firebase: { | |
adapter: 'sails-firebase', | |
credential: { | |
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | |
"auth_uri": "https://accounts.google.com/o/oauth2/auth", | |
"client_email": "[email protected]", | |
"client_id": "[email protected]", | |
// "client_x509_cert_url": "<YOUR CLIENT X509 CERTIFICATE>", | |
"private_key": "MY API KEY", | |
"private_key_id": "MY API KEY", | |
"project_id": "myApp", | |
"token_uri": "https://accounts.google.com/o/oauth2/token", | |
"type": "service_account", | |
}, | |
databaseURL: "https://myApp.firebaseapp.com", | |
} | |
}; | |
Error: ----------------------------------------- | |
The adapter used by the firebase datastore is not compatible with the current version of Sails/Waterline. | |
The adapter should expose a valid adapterApiVersion. | |
If you're using Sails ≥1.0, try: npm install sails-firebase@latest --save | |
after that i used "npm install sails-firebase@latest --save" but not work :( is there any npm package or any method for using firebase? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment