@lautmaler/jovo-db-firestore
v1.2.1
Published
Firestore database integration for the Jovo Framework
Downloads
66
Readme
Jovo FirestoreDb Database Integration
This package enables you to integrate your Jovo app with a Firestore database.
$ npm install @lautmaler/jovo-db-firestore
Installation
You can install the plugin like this:
$ npm install @lautmaler/jovo-db-firestore
Add it as plugin to any stage you like, e.g. app.prod.ts
:
import { FirestoreDb } from '@lautmaler/jovo-db-firestore';
// ...
app.configure({
plugins: [
new FirestoreDb({
collection: '<YOUR-FIRESTOREB-COLLECTION-NAME>',
}),
// ...
],
});
Configuration
The following configuration can be added:
new FirestoreDb({
collection: '<FIRESTOREDB-COLLECTION-NAME>',
keyFileName: '<FILE-IDENTIFIER-FOR-SERVICE-ACCOUNT-CREDENTIALS>',
credentials: {
clientEmail: '<SERVICE-ACCOUNT-CLIENT_EMAIL>',
privateKey: '<SERVICE-ACCOUNT-PRIVATE_KEY>',
},
projectId: '<GOOGLE-CLOUD-PROJECT-ID>',
});