Trigger FCM using Node JS Server | How to send push notifications using Node JS and Firebase?

Поделиться
HTML-код
  • Опубликовано: 8 июл 2023
  • In this video, we see how you can create a Node JS Server using Firebase Admin SDK to send out push notifications.
    When you hit a post endpoint on the Node JS server, it delivers a notification to a Flutter app using Firebase Messaging.
    We also deploy the Node JS Server to a free hosting (render.com).
    Documentation Links -
    Setup Firebase admin SDK in Node: firebase.google.com/docs/admi...
    Add a Service account to authorise send: firebase.google.com/docs/clou...
    Send message using Node: firebase.google.com/docs/clou...
    GitHub Gist (with Node Server code)
    gist.github.com/adityathakurx...
    ----------------------------------------------------------------------------
    Hey!
    I am Aditya Thakur, a Developer and Designer. I make videos on Flutter, Python, and other technologies. I also sometimes take up Profile Building and entrepreneurship!
    💙 Learn how to use Flutter with Firebase: • FlutterFire - Free Fir...
    🎬 Python Debugged Playlist: • Python Debugged
    📚 PROMOS
    Get an exclusive 10% discount on every GeeksforGeeks course!!
    Use code: ADITYAT
    Check out courses here: practice.geeksforgeeks.org/co...
    💰 INVESTMENT APPS
    Invest in stocks using Paytm Money: paytmmoney.onelink.me/9L59/85...
    Create a free account | Binance: accounts.binance.cc/en/regist...
    Trade at India’s largest exchange | WazirX: wazirx.com/invite/xen3p4h3
    ⚙️ My Gear
    📸 Camera: amzn.to/3Ha7xrm
    🎙️ Mic (Maono AU): amzn.to/3N9BBHm
    🖥️ Mechanical Keyboard: amzn.to/40C8PCz
    I post stories about my life and business on my Instagram - / adityathakurxd
    Want to talk business? Or ask a question?
    Reach out to me on LinkedIn: / adityathakurxd
    ----------------------------------------------------------------------------
    Become a part of my community! (100+ Developers already 🥰)
    Link to Discord/Telegram: linktr.ee/flutterdev

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

  • @davidakinde7427
    @davidakinde7427 6 месяцев назад +4

    You saved me bro. Been checking pointless articles but none gave the right instructions

  • @ThomasAlbuquerque
    @ThomasAlbuquerque 2 месяца назад +1

    Very good video, it was exactly what I was looking for, thank you very much

  • @heinhtetaung6566
    @heinhtetaung6566 8 месяцев назад +2

    Thank you for such an amazing tutorial. 100% working fine according to instruction. You save my day.

    • @oldlazylobster
      @oldlazylobster 8 месяцев назад

      did you setup nodejs server or just implemetned flutter part

    • @pradeepa6023
      @pradeepa6023 8 месяцев назад

      is it mandatory to set the environment variables each time

  • @LarsJeppesen-bk4dw
    @LarsJeppesen-bk4dw 10 месяцев назад

    Thank you, great video

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

    Thanks for the video. Can you put an image in notifications?

  • @Moni_Thakur
    @Moni_Thakur Месяц назад

    Thankyou so much yr ❤

  • @DanielTilahun-pv9gv
    @DanielTilahun-pv9gv Год назад

    Please help me foreground notification is not working for me can you provide me the front end code?

  • @mishenthakshana3407
    @mishenthakshana3407 11 месяцев назад +1

    Thankyou

  • @mystikyogi
    @mystikyogi 9 месяцев назад

    Looks good. I am wondering if notification will be delayed when deployed in production due to high load and concurrent requests. If i want reduce the overall latency for example in app like Facebook if someone liked my post i should get instant notification. How can we achieve this?

    • @YaqubTawabOlamilekan
      @YaqubTawabOlamilekan 24 дня назад

      This is where queues comes into play . You can read up on Messaging queues, creating background jobs and sending messages using queues.

  • @user-sn8lf3ss7k
    @user-sn8lf3ss7k 5 месяцев назад

    Can you please help me with something similar, actually i want to send notification to web,app,ios through single api in nodejs , like when i hit the api then the notification should be send to web,app and ios platforms, together .How can i do this , I preferred the docs of firebase for this and i implemented subscribe to topic functionality but its not working and group devices functionality but i am getting error in that also , can you just tell me the right way to do this and please reply me soon if possible ,its urgent for me..your help is appreciated

  • @kathir1188
    @kathir1188 3 месяца назад

    I have one doubt, how to send a push notification to the partiular device?

  • @thediverseengineer
    @thediverseengineer 5 месяцев назад

    It is neccesary to deploy app somewhere only to get notificatin on your mobile

  • @saurabhpankaj3263
    @saurabhpankaj3263 4 месяца назад +1

    Hello aditya i need to your help🙏🙏🙏🙏🙏 for implement code

  • @SunnySingh-m4l
    @SunnySingh-m4l Месяц назад

    Is this code will work both Android and Ios for push notifications?

  • @the_sharma_amit
    @the_sharma_amit 5 месяцев назад

    can i deploy node js server to firebase free hosting??

  • @Seraf_
    @Seraf_ Месяц назад

    Error senerId missmatch. I don know how fix it error

  • @ershathm6970
    @ershathm6970 9 месяцев назад

    this is a good video

  • @maurosergiorodriguesdasilv2732
    @maurosergiorodriguesdasilv2732 8 месяцев назад

    how did u hosting the file json push_notification_key.json on render to work?

    • @AbhinayKumarMerugu
      @AbhinayKumarMerugu 6 месяцев назад

      I think he forgot to show how to set environment variables in the render server settings. You need to give the same key-values from your .env file. Even you can give a try to put the JSON content in the env value.

  • @countmein5164
    @countmein5164 5 месяцев назад

    Your .env format was wrong

  • @donnyskinner3423
    @donnyskinner3423 Год назад

    🤭 "Promo SM"

  • @user-uh5yn5qo1b
    @user-uh5yn5qo1b 5 месяцев назад +1

    const receivedToken = req.body.fcmToken
    how can we get fcmToken in req.body
    it is not giving you error like fcmToken is undefined