The main idea of this project is to have a scaffolding to implement a cloud function easily.
- Go to GCP console
- Create a new cloud function
- The most important part is the source configuration.
- Set the repository name and the folder correctly.
- Set the function name identically to the name of the export function in the
index.js
.
Go to testing tab on the cloud function and in Triggering event paste:
{"data":"c3RhY2thYnVzZS5jb20="}
In the console run
npm rum start:pubsub
and go to http://localhost:8080/