Skip to content

uhooi/UhooiPicBook-Firebase

Repository files navigation

UhooiPicBook-Firebase

License Twitter

logo

Testing Firestore security rules for Uhooi's character book.

Environment

  • Node.js: v12.14.0
  • npm: 6.13.4

Setup

  1. Clone the project.
$ git clone https://github.com/uhooi/UhooiPicBook-Firebase.git
$ cd UhooiPicBook-Firebase
  1. Install Firebase CLI.
$ npm install -g firebase-tools
  1. Install the emulator.
$ firebase setup:emulators:firestore
  1. Install packages managed by npm.
$ npm install

Testing

  1. Run firebase login to authenticate the CLI.
$ firebase login:ci
$ export FIREBASE_TOKEN={generated Firebase token}
  1. Export envirionment variables.
$ export FIREBASE_DATABASE_EMULATOR_HOST=localhost:9000
$ export FIRESTORE_EMULATOR_HOST=localhost:8080
  1. Run npm test .

References