-
Navigation menu > Firestore >Select Native Mode
-
Clone the repository
git clone https://github.com/rosera/pet-theory
-
Ubah direktori
cd pet-theory/lab01
-
Install package
npm install @google-cloud/firestore
npm install @google-cloud/logging
-
Ubah kode sesuai dengan petunjuk
-
Install package
npm install [email protected]
-
Ubah kode sesuai dengan petunjuk
-
Set Project ID
gcloud config set project PROJECT_ID
PROJECT_ID=$(gcloud config get-value project)
-
buat fake data
node createTestData 1000
-
import data
node importTestData customers_1000.csv
node createTestData 20000 node importTestData customers_20000.csv
- Cek di Firestore
- Edit dan delete data di Firestore
-
just read the logs
gcloud projects add-iam-policy-binding $PROJECT_ID \ --member=user:[email protected] --role=roles/logging.viewer
-
check code
gcloud projects add-iam-policy-binding $PROJECT_ID \ --member=user:<[email protected]> --role roles/source.writer