We will now create a cloud function through the GCP console:
- Go to the Cloud Functions overview page in the GCP console, select the project from the drop-down list for which the function is attached.
- Click on Create Function.
- Name the function as my-serverless-function.
- Select the trigger as an HTTP trigger.
- Let's use the default code, so it should be checked by an inline editor. The text area will have two scripts, one is index.js and the other is package.json. This is a simple helloworld function provided by Google Functions. The function logs a message which you provide in a later step. When you finish the steps you will see something similar to the following screenshot:
- Click on the Create ...