Building and Testing Locally
Cloud Functions execute in a managed Node.js runtime environment so you can build and test your functions locally just using a standard Node.js runtime along with your favorite development tools.
To make testing and debugging easy, you can also use a local emulator to run and debug your functions locally.
When deploying, Cloud Functions will look for a file named
function.js. If you've provided a
package.json file that contains a
entry, then Cloud Functions will look for the specified file instead.
Note: The first time you deploy a function it may take several minutes as we need to provision the underlying infrastructure to support your functions. Subsequent deployments will be much faster.
Deploy using the console
If you prefer to use the Cloud Platform Console UI, you can also create and deploy functions from the Cloud Functions page in the Cloud Platform Console.
Deploy using the
gcloud command-line tool
For the complete reference for the
gcloud beta deploy command-line tool, see
gcloud beta functions deploy.