How to deploy whatsapp-web.js on google cloud run?

Viewed 328

I have a nodejs application that listens to events on the firebase firestore and performs actions on the whatsapp-web.js client based on the event.

The process is as follows: Let's say I have a collection "requests" in firestore and every time a document in the collection is created (updated), it generates the following actions:

  • The function in my nodejs code that listens for events will retrieve the document, read the request and launch an action from the whatsapp-web.js client.

  • The whatspp-web.js client to perform the action, must launch, initialize a connection, and then perform the request action (the document from the request collection) once the client is connected.

Except that cloud run closes before all these previous functions are performed.

Is there a way to solve this problem with cloud run or should we look for an alternative solution like compute engine?

0 Answers
Related