- Notifications
You must be signed in to change notification settings - Fork161
Node.js client for Google Cloud Firestore: a NoSQL document database built for automatic scaling, high performance, and ease of application development.
License
googleapis/nodejs-firestore
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is the Node.js Server SDK forGoogle Cloud Firestore. Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.
This Cloud Firestore Server SDK uses Google’s Cloud Identity and Access Management for authentication and should only be used in trusted environments. Your Cloud Identity credentials allow you bypass all access restrictions and provide read and write access to all data in your Cloud Firestore project.
The Cloud Firestore Server SDKs are designed to manage the full set of data in your Cloud Firestore project and work best with reliable network connectivity. Data operations performed via these SDKs directly access the Cloud Firestore backend and all document reads and writes are optimized for high throughput.
Applications that use Google's Server SDKs should not be used in end-user environments, such as on phones or on publicly hosted websites. If you are developing a Web or Node.js application that accesses Cloud Firestore on behalf of end users, use the firebase Client SDK.
Note: This Cloud Firestore Server SDK does not support Firestore databases created inDatastore mode. To access these databases, use theDatastore SDK.
- Cloud Firestore Node.js Client API Reference
- Cloud Firestore Documentation
- github.com/googleapis/nodejs-firestore
Read more about the client libraries for Cloud APIs, including the olderGoogle APIs Client Libraries, inClient Libraries Explained.
Table of contents:
- Select or create a Cloud Platform project.
- Enable the Cloud Firestore API.
- Set up authentication with a service account so you can access theAPI from your local workstation.
npm install @google-cloud/firestore
const{Firestore}=require('@google-cloud/firestore');// Create a new clientconstfirestore=newFirestore();asyncfunctionquickstart(){// Obtain a document reference.constdocument=firestore.doc('posts/intro-to-firestore');// Enter new data into the document.awaitdocument.set({title:'Welcome to Firestore',body:'Hello World',});console.log('Entered new data into the document');// Update an existing document.awaitdocument.update({body:'My first Firestore app',});console.log('Updated an existing document');// Read the document.letdoc=awaitdocument.get();console.log('Read the document');// Delete the document.awaitdocument.delete();console.log('Deleted the document');}quickstart();
Samples are in thesamples/ directory. The samples'README.mdhas instructions for running the samples.
| Sample | Source Code | Try it |
|---|---|---|
| Quickstart | source code | ![]() |
| Solution-counters | source code | ![]() |
TheCloud Firestore Node.js Client API Reference documentationalso contains samples.
This library followsSemantic Versioning.
This library is considered to beGeneral Availability (GA). This means itis stable; the code surface will not change in backwards-incompatible waysunless absolutely necessary (e.g. because of critical security issues) or withan extensive deprecation period. Issues and requests againstGA librariesare addressed with the highest priority.
More Information:Google Cloud Platform Launch Stages
Contributions welcome! See theContributing Guide.
Apache Version 2.0
SeeLICENSE
About
Node.js client for Google Cloud Firestore: a NoSQL document database built for automatic scaling, high performance, and ease of application development.
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
