DEV Community

katongole Isaac
katongole Isaac

Posted on

How can i fetch data about rooms in chat-app

Hi guys,

I'm working on a chat app with the following tech stack, On

Frontend

  • Nextjs
  • Websocket

Backend

  • Nodejs (expressjs)
  • ws

I have some questions to ask regarding some use cases.
Use Cases

  1. How can i retrieve data specific chatrooms, should i

    • create an endpoint and use that.
    • use websocket message to send a command that retrieve data.
  2. On the frontend, I use firebase Auth, the challenge am facing is that,

  3. I'm failing to update the user token returned from firebase, the token lifespan is about an hour, i have set a setInterval() inside it, i fetch the new token every after 30 minutes but the token state variable cannot update.

Top comments (0)