I'm starting with Google Cloud Functions, and I want to use a real editor + github instead of the inline editor.
For an existing Google App Engine Flex(php) project, I've modified it so that it publish on PubSub some data about user.
I want to write a set of functions :
- One function that update BigQuery, and post on a topic that a user data has been updated
- Subscribed to this update : Several functions would run on query on BigQueries and store the result in Firebase (for a mobile app to display the data statistics)
Here are some basic questions I couldn't find any answer :
- How can I organise my project? What is the expected layout so that GCP can fetch the project from github and run it ?
- [Optional] Can I have multiple file for one function to organise my code ?
I've found this : https://github.com/PrinceCornNM/generator-firebase-cloud-functions but I also read that the Function for firebase was somehow incompatible on a stackoverflow post.
Here is how I made it work :
Setup the Github Repository
Check my repository as an example : https://github.com/dev-mansonthomas/RedCrossQuestCloudFunctions
Sync my Github Repo with Google Source Control
(I had to try twice, the first time I got an error without details)
Create your Cloud Function from Source Control