Connect to Firestore DB using Admin SDK - Online store with Nuxt 3 & Firebase

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 16

  • @maskman4821
    @maskman4821 2 года назад +1

    This is very useful and practical tutorial 😍

  • @KazahMoyMuzh
    @KazahMoyMuzh 2 года назад +1

    Thank you!

  • @michael-strain
    @michael-strain Год назад +1

    Do we really have to initialize the admin sdk on each endpoint using firestore? Is there a way that you know of to initialize once on the server and have endpoints use it?

    • @elilopezdev
      @elilopezdev  Год назад +1

      Hi, since this is not a regular Node.js server that's always on, you do need to check if you have to initialize admin SDK every time you call it. That's because Firebase Cloud Functions are stateless, meaning the execution environment is often initialized from scratch (this is called a cold start). If you stop using the function for a while, you'll see your endpoint takes longer to respond the first time you call it again because it's booting your function again.

  • @lucasmordzin
    @lucasmordzin 2 года назад +1

    Could you make a tutorial teaching how to deploy nuxt3 on firebase hosting?

  • @0xiah
    @0xiah Год назад

    How do you use cert when deploying if the cert file is in git ignore?

  • @RyuuuGamingUnlimited
    @RyuuuGamingUnlimited 2 года назад

    how do you deploy it in netlify if the service account key json is not included? I'm practicing nuxt 3 and I want to deploy my app in netlify.
    Thanks!

  • @danielwatson6529
    @danielwatson6529 2 года назад +1

    Awesome!, didn't expect to see it like that - ive learned allot today Thanks! At the end it says Authentication is next when is that ready?

    • @danielwatson6529
      @danielwatson6529 2 года назад +1

      oh I think I found it in with the stripe subscriptions!!

    • @elilopezdev
      @elilopezdev  2 года назад +1

      ​@@danielwatson6529 Yes! Glad it's helpful. Auth was tricky to do with Nuxt 3 and probably will change in the near future (because Beta), so I decided to continue with Vue 3 tutorials until Nuxt 3 gets more stable and packages like @nuxt/auth get updated

  • @shiryaev585
    @shiryaev585 7 месяцев назад

    How do you set POST requests in such an app. For example,
    await useFetch('/api/products', {
    method: 'POST',
    body: someBody
    }).data;
    }
    I get 200 status code, but i don't see a new object in my collection
    Thanks!

  • @danielwatson6529
    @danielwatson6529 2 года назад

    at 6:00 you say if you change a field in fire store we will see it on the front end. This is only true if I refresh, I was hoping for the same effect as unsubscribe/realtime listener, I can't seem to find anything on this other than putting it on the client side, which defeats the object I think

  • @csechuan
    @csechuan 2 года назад +2

    Hey bro, what happen if use Firebase client SDK on nuxt3?

    • @elilopezdev
      @elilopezdev  2 года назад +2

      It is posible, but that means you'd also have to use Firebase client side authentication later, making it harder to detect auth server-side. So things like auth server-side middlewares to redirect not authenticated users, and server side rendering in general becomes complicated.
      With this approach, you can handle Auth using Nuxt.js and then use the Admin SDK to bring info from Firestore.

  • @vinosamari
    @vinosamari 2 года назад

    Hi Eli. I’m having issues using my realtime database in Nuxt. I can’t seem to listen for changes and populate an array with the changes accordingly. Any help will be greatly appreciated.

    • @danielwatson6529
      @danielwatson6529 2 года назад

      im having the same issue, did you find a solution?