A small helper tool to quickly read and write from a Firebase Firestore database.
Add a .env file in the root file with the following attributes.
FIREBASE_DATABASE_URL=
FIREBASE_PROJECT_ID=
FIREBASE_PRIVATE_KEY=
FIREBASE_CLIENT_EMAIL=
You must add your key into double qoutes to allow expanded new lines option according with dotenv documentation.
You can check that option at Rules section in dotenv github.
https://github.com/motdotla/dotenv#rules
Have NodeJS installed globally on your machine.
Install node module dependencies.
yarn install
or
npm install
-
Navigate to the root directory of this project in terminal.
-
Edit the run() inside index.js function with your read/write code.
-
Run the NodeJS Server.
node index.js