https://github.com/zaszab/cloud-firestore-nodejs
Getting Started app with Cloud Firestore with Node.js. Based on Google Firecast video
https://github.com/zaszab/cloud-firestore-nodejs
firebase firestore-database nodejs
Last synced: 3 months ago
JSON representation
Getting Started app with Cloud Firestore with Node.js. Based on Google Firecast video
- Host: GitHub
- URL: https://github.com/zaszab/cloud-firestore-nodejs
- Owner: zaszab
- Created: 2018-03-19T12:49:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-19T12:51:34.000Z (about 7 years ago)
- Last Synced: 2024-12-26T13:11:47.349Z (5 months ago)
- Topics: firebase, firestore-database, nodejs
- Language: JavaScript
- Homepage: https://www.youtube.com/watch?v=Z87OZtIYC_0
- Size: 1000 Bytes
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Getting Started with Cloud Firestore with Node.js
Example Node.js application based on Firecast video:
https://www.youtube.com/watch?v=Z87OZtIYC_0Free quotes API used for quote generation:
https://quotesondesign.com/api-v4-0/On default your database will have only one document (sampleData/inspiration) like in the video, and the app will update this only document every call.
But you can turn on multiple mode, allowing to have multiple documents (eg. sampleData/inspiration_1540).
## Getting Started
You will need nodeJS and npm.
Clone the repo, then run in the console:
```
cd cloud-firestore-nodejs/
npm install
```Then add your Firebase Private Key to your project. Create your private key if you don't have it yet:
https://firebase.google.com/docs/admin/setup#add_firebase_to_your_appThen copy the key to the directory
```
cp [key_original_location] .
mv [key_original_name] ServiceAccountKey.json
```Then run it
```
node index.js
```If you want to save multiple documents, enable it with
```
const multipleDocuments = true;
```