How to access Firebase Realtime Database through a REST API

right now I am using firebase in a react project with some cloud functions. The react app writes and listens to updates from the firebase database in real time through the javascript sdk. However, I’d like to move all my backend logic to a REST API. Howver, I am stuck wondering how I’d subscribe to realtime updates on the database without accessing the database directly on the client. Is there an existing way to do this currently?