Тёмный

Getting Started with Cloud Firestore with Node.js - Firecasts 

Firebase
Подписаться 381 тыс.
Просмотров 135 тыс.
50% 1

In this episode of Firecasts, Jen Person shows you how to get started using the Firebase Admin SDK to read and write data with Cloud Firestore. The Firebase Admin SDK is shown for Node. js, but Java, Python, & Go are also supported. If you're interested in learning more, be sure to check out the links below!
Setting up the Admin SDK → goo.gl/8yNyD1
Cloud Firestore documentation → goo.gl/Zm2oj3
Initializing npm → goo.gl/VsrXEy
Getting Started with Notifications on iOS → goo.gl/Pcpjty
Add the Firecasts playlist → goo.gl/n2XqG1
Subscribe to the Firebase Channel → goo.gl/9giPHG

Наука

Опубликовано:

 

25 янв 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 69   
@mateja176
@mateja176 6 лет назад
Awesome firecast, Jen! Can you continue where you left off an implement push notifications, that'd be super cool!
@nixon3598
@nixon3598 4 года назад
if you are a beginner like me, and just want this to get the code up and running, note that the getQuote() code is not provided, and it won't work if you strictly follow the video. To make it work replace the getQuote() stuff with this: function getQuote() { const quoteData = { quote: "random", author: "String" }; return db.collection("sampleData").doc("inspiration").set(quoteData).then(() => { console.log("new quote was written to the database");}) } getQuote();
@danielflores407
@danielflores407 6 лет назад
I will try this approach for my next project, thanks Jen
@planetmall2
@planetmall2 4 года назад
Thank you this helped me. It was a little fast and maybe not as practical (using more UI might help) to follow along with. This did help me accomplish this task.
@JohnSmith-rn3vl
@JohnSmith-rn3vl 6 лет назад
I am learning node ... and i don't find these short burst tutorials all that useful. I have followed several and built various mini firebase apps but always end up with more questions than answers. It would be great if you could show how to use firebase to build an incredibly simple app which covers everything you need to build a real world app. Including authentication, crud, jwt and whatever other essential features are required to build and app these days.
@CoryTheSimmons
@CoryTheSimmons 6 лет назад
This. To further pinpoint the problem, long video on Firestore Rules pleeeease.
@RayOrsini
@RayOrsini 6 лет назад
I came here to say exactly this. It's like she's doing her best to type and talk as quickly as possible. Definitely takes away from the benefit of the lesson when I have to pause it 10 times.
@greatramu86
@greatramu86 6 лет назад
agreed. these videos are mode like TV commercials
@moradal-rowaihi7805
@moradal-rowaihi7805 4 года назад
agree with you , I've noticed this since the first video of the whole channel , they seem to hide some info and tips , I try my best to find answers in the internet while they could provide a simple tutorial that covers all stuff , even if you find some code , you will stuck in (how the hell I can use it or merge it with my existed code )
@iancuvlad7368
@iancuvlad7368 4 года назад
You would find it very useful if you're using cloud functions
@camillo8575
@camillo8575 4 года назад
I was missing the credentials... thank you for this!
@DiegoJaraPalomino
@DiegoJaraPalomino 6 лет назад
Should be this the approach to migrate mi data(from other services) to Firestore?
@Lovedeep555
@Lovedeep555 Год назад
Thank you, this is what I was looking for!!
@Firebase
@Firebase Год назад
We're so happy that you've found this video helpful! Don't forget to check out the video description for more helpful resources 😄
@tomscanlan4985
@tomscanlan4985 6 лет назад
Can we get a Cloud Firestore security rules lesson. Pleeeeeease????
@TKSnatch
@TKSnatch 6 лет назад
+1 we need this so bad! Please let this be the next video.
@TheNamesJT
@TheNamesJT 2 года назад
I'm confused, using this method would I still need to host my server? since i'm using express locally would rather have the server and database together on firebase. if this isn't the video for my needs please comment on which video I should watch to do what i'm asking.
@parasmanikc7341
@parasmanikc7341 4 года назад
Great Video! Should've also shown the getQuote(), that would have made following along easier, though I tried with simple dummy data and it worked.
@aviralsaxena5153
@aviralsaxena5153 6 лет назад
How do I delete documents of an collection that meet specific conditions via the where statement?
@AmsaAce
@AmsaAce 6 лет назад
Say if multiple doc.set operations occur a second, does firebase guarantee that all of the clients will see every single change? e.g. if called a 1000 times a second, would each client receive 1000 quotes a second.
@praveenkumarax
@praveenkumarax 6 лет назад
Just one point: Once you read doc().then(doc), you get the value with "doc.data()"
@doniyorotamurodov5624
@doniyorotamurodov5624 4 года назад
Thank u so much for this video! I couldn't run "firebase serve".
@rajarajancanada
@rajarajancanada 6 лет назад
How do you connect to the Firebase Database?
@mohanrajshanmugam7025
@mohanrajshanmugam7025 5 лет назад
please help me?!! how to configure and perform queries in firebase firestore using php?
@sumerrana3097
@sumerrana3097 6 лет назад
can we use firebase with .Net languages?
@zajdoszabolcs
@zajdoszabolcs 6 лет назад
You can find the code here based on the video: github.com/zaszab/cloud-firestore-nodejs
@user-qh4dr1vy9d
@user-qh4dr1vy9d 3 года назад
its was really helpful
@jaronfort9097
@jaronfort9097 4 года назад
How do you return a promise from getQuote() ?
@Luggruff
@Luggruff 5 лет назад
I've installed firebase admin on my server and when I get to the line where you write "code index.js" then I get: "-bash: code: command not found". If I create an index.html with javascript as suggested here: firebase.google.com/docs/admin/setup?authuser=0 I get object error: "(index):11 Uncaught ReferenceError: require is not defined at (index):11" which is the: "var admin = require('firebase-admin');" line. There is no issue at all installing firebase locally, why can't I for the life of me get it to work on my server and thus my website? Why can't you make a video that shows how to get started to begin with before making these other videos?
@premchandran7279
@premchandran7279 3 года назад
Hi, thats a great video. I want to know how to run nodejs whenever firebase data changes. Is there any possibilities ?
@maheshmahadar4780
@maheshmahadar4780 3 года назад
yes it is
@ronjunevaldoz5673
@ronjunevaldoz5673 4 года назад
why the document is not created
@djbravo9710
@djbravo9710 2 года назад
Can firebase-admin sdk override firestore rules? Suppose I have an app and to fetch, update or delete data from it, you have to be the perticular document's creator. If I try to change the document using firebase-admin sdk, will that deny my approach? Or I can break every rules and change the document without being owner of it?
@Frank_van_Puffelen
@Frank_van_Puffelen 2 года назад
Code using the Admin SDKs has full read/write access to all data (and most of the project in general), and bypasses the security rules.
@djbravo9710
@djbravo9710 2 года назад
@@Frank_van_Puffelen ❤️
@lukecross5439
@lukecross5439 3 года назад
Admin sdk can't access direct method storage? To delete a image file from url download.
@emmanuelsahrsewah
@emmanuelsahrsewah 3 года назад
experiencing similar problem myself Wondering whether there is a way around this
@LuuckyLuuke
@LuuckyLuuke 6 лет назад
Thank you for these videos! Could you please add next time link to git repository with created code? I got lost few times because video doesn´t contain everything. Thank you again :)
@christiangao5490
@christiangao5490 5 лет назад
its funny how these videos never show us the git link lol
@basickarl
@basickarl 3 года назад
Aaand how does one connect to the Firestore Emulator.
@YOYO-dl6fe
@YOYO-dl6fe 6 лет назад
How to make a contains query in Cloud firestore
@YOYO-dl6fe
@YOYO-dl6fe 6 лет назад
Pipe Dreams Only worried about eyes
@DheerajRijhwani
@DheerajRijhwani 6 лет назад
When was Cloud Functions coming with java.
@ShashankMSuresh
@ShashankMSuresh 3 года назад
Java sucks lol. Who uses that with a new modern application except for older applications or FWs😂
@DheerajRijhwani
@DheerajRijhwani 3 года назад
@@ShashankMSuresh I didn't know at that time man.
@ShashankMSuresh
@ShashankMSuresh 3 года назад
@@DheerajRijhwani hehe chill 😂
@Henry78119
@Henry78119 4 года назад
Help!! i get the error: "ReferenceError: getQuote is not defined"
@puneettripathi8418
@puneettripathi8418 4 года назад
she used a pre-written function. Until you didn't define it the error will remain the same. getQuote is not pre-defined function it's a developer generated function
@studyrush9332
@studyrush9332 4 года назад
function getQuote() { return new Promise((resolve, reject) => { resolve({ quote: 'come on!!', author: 'Rob Shneider' }); }); } there you go
@adiyadav7501
@adiyadav7501 4 года назад
TypeError: Cannot read property 'quotes' of undefined
@usmansharifhh3314
@usmansharifhh3314 4 года назад
where is getQuote code?
@niyasp7873
@niyasp7873 6 лет назад
#askFirebase what is the difference and advantages of using admin sdk and firebase cloud function
@CoryTheSimmons
@CoryTheSimmons 6 лет назад
Admin sdk is write/secure operations. Cloud Functions are just Express routes.
@niyasp7873
@niyasp7873 6 лет назад
#askFirebase const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); const db=admin.firestore(); exports.addUserData = functions.auth.user().onCreate(event => { const user = event.data; const userUid=user.uid; const userData={ name:user.displayName, uid:user.uid } return db.collection('peoples').doc(userUid).set(userData) }) the above code always shows this error given below Error: Cannot encode type ([object Undefined]) to a Firestore Value at Function.encodeValue (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/document.js:775:11) at Function.encodeFields (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/document.js:646:36) at Function.fromObject (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/document.js:202:55) at WriteBatch.set (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/write-batch.js:272:39) at DocumentReference.set (/user_code/node_modules/firebase-admin/node_modules/@google-cloud/firestore/src/reference.js:425:8) at exports.addUserData.functions.auth.user.onCreate.event (/user_code/index.js:13:46) at Object. (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:59:27) at next (native) at /user_code/node_modules/firebase-functions/lib/cloud-functions.js:28:71 at __awaiter (/user_code/node_modules/firebase-functions/lib/cloud-functions.js:24:12) please help
@mohdigwey
@mohdigwey 6 лет назад
What is the name of this IDE please?
@dilass
@dilass 6 лет назад
It's VS Code
@SuperShivammm
@SuperShivammm 5 лет назад
It is VS code of Microsoft and free. Below is the link code.visualstudio.com/
@StasBar
@StasBar 6 лет назад
What IDE are you using?
@SuperShivammm
@SuperShivammm 5 лет назад
It is VS code of Microsoft and free. Below is the link code.visualstudio.com/
@Kaalkian
@Kaalkian 6 лет назад
would be nice to get the code to replicate this project for new users #askFirebase
@Kaalkian
@Kaalkian 6 лет назад
also please consider removing the autcomplete code its making it difficult to follow. but overall great tutorial.
@zajdoszabolcs
@zajdoszabolcs 6 лет назад
I've made one solution public based on the video: github.com/zaszab/cloud-firestore-nodejs
@gabrielaugusto6001
@gabrielaugusto6001 4 года назад
How can i deploy?
@jpisty
@jpisty 3 года назад
Webpack 5 seems to be breaking this. ugh
@chickmagnet2067
@chickmagnet2067 Год назад
Not helpful. Also it is Gandhi not Ghandi.
@chickmagnet2067
@chickmagnet2067 Год назад
Not helpful. Also it is Gandhi not Ghandi.
Далее
Firestore CRUD with NODE.JS 🔥
24:59
Просмотров 25 тыс.
Node.js is a serious thing now… (2023)
8:18
Просмотров 631 тыс.
Hosting a REST API with a Cloud Firestore backend
19:21
Heroku Is Dead, Here's What I Recommend
11:59
Просмотров 250 тыс.
Cloud Firestore Data Modeling (Google I/O'19)
40:37
Просмотров 171 тыс.
Faster Firestore via Data Aggregation
9:28
Просмотров 61 тыс.
Learn JavaScript With This ONE Project!
1:10:26
Просмотров 664 тыс.
Introducing Cloud Firestore (Firebase Dev Summit 2017)
36:14
Server-side Firebase Authentication Using Express JS
22:02
Firestore Data Modeling - Five Cool Techniques
11:44
Просмотров 253 тыс.
Acer Predator Тараканьи Бега!
1:00
Просмотров 155 тыс.