@rollinginfra/state-store-google-firestore
v1.0.0
Published
Store JSON state objects in Google Firestore. Keys can be any valid UTF-8 string.
Downloads
2
Readme
State Store - Google Firestore
Store JSON state objects in Google Firestore. Keys can be any valid UTF-8 string.
Set Up Google Firestore
- Enable the Firestore API
- Create a Firestore database instance N.B. You must select the "Native mode" if prompted to choose a mode. The Datastore mode is for legacy support, and will not work with this package.
- Choose a collection name. You don't actually need to create it as collections are automatically created when documents are added to them.
Set up your local environment
You can set up your local environment by running gcloud init
and following the prompts to authenticate.
import StateStoreGoogleFirestore from '@rollinginfra/state-store-google-firestore';
const state = new StateStoreGoogleFirestore({
googleProjectID: `YOUR_GOOGLE_PROJECT_NAME`,
collectionName: `YOUR_COLLECTION_NAME`,
});