Testing Firestore security rules for Uhooi's character book.
- Node.js: v12.14.0
- npm: 6.13.4
- Clone the project.
$ git clone https://github.com/uhooi/UhooiPicBook-Firebase.git
$ cd UhooiPicBook-Firebase
- Install Firebase CLI.
$ npm install -g firebase-tools
- Install the emulator.
$ firebase setup:emulators:firestore
- Install packages managed by npm.
$ npm install
- Run firebase login to authenticate the CLI.
$ firebase login:ci
$ export FIREBASE_TOKEN={generated Firebase token}
- Export envirionment variables.
$ export FIREBASE_DATABASE_EMULATOR_HOST=localhost:9000
$ export FIRESTORE_EMULATOR_HOST=localhost:8080
- Run
npm test
.
- https://firebase.google.com/docs/cli/
- https://firebase.google.com/docs/firestore/security/test-rules-emulator
- https://firebase.google.com/docs/firestore/security/rules-structure
- https://github.com/firebase/quickstart-nodejs/tree/master/firestore-emulator/typescript-quickstart
- https://github.com/mogaming217/youtube-simple-todo-sample
- https://techlife.cookpad.com/entry/2018/11/05/143000