Skip to content
This repository has been archived by the owner. It is now read-only.
A local emulator for deploying, running, and debugging Google Cloud Functions.
Branch: master
Clone or download
grant Update README.md with deprecation (#328)
* Update README.md with deprecation
* docs: Remove "new" from archive message
Latest commit 570fd4f May 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci chore(build): move to CircleCI 2.0 (#225) Jul 20, 2018
.github Add repo-tools. (#154) Nov 6, 2017
bin Update Node version warning message for emulator (#315) Apr 16, 2019
docs/images
scripts 1.0.0-beta.1 (#177) Feb 21, 2018
src Handle missing logfiles correctly (#199) Nov 16, 2018
test Fix: Fix lint (#313) Mar 5, 2019
.gitignore Fixes #150 Oct 22, 2017
.mailmap Add repo-tools. (#154) Nov 6, 2017
AUTHORS Tweak CI and other updates. Dec 30, 2016
CHANGELOG.md 1.0.0-beta.5 (#263) Aug 1, 2018
CODE_OF_CONDUCT.md Add repo-tools. (#154) Nov 6, 2017
CONTRIBUTORS 1.0.0-beta.5 (#263) Aug 1, 2018
LICENSE Add repo-tools. (#154) Nov 6, 2017
README.md Update README.md with deprecation (#328) May 15, 2019
mocks.js 1.0.0-alpha.11 Mar 6, 2017
package.json fix: add missing cli-table3 dependency (#301) Mar 5, 2019
renovate.json Update renovate.json (#312) Mar 14, 2019

README.md

Status: Archived

status: inactive

This repository has been archived and is no longer maintained.

We recommend you use:

Please see Issue #327 for more details.


Google Inc. logo

Google Cloud Functions Emulator

NPM Tests Coverage

Disclaimer: This is not an official Google product.

Table of Contents

What is the Google Cloud Functions Emulator?

The Google Cloud Functions Emulator is a Node.js application that implements the Google Cloud Functions API, and includes a CLI with which you can manage the application.

The Emulator allows you to deploy, run, and debug your Cloud Functions on your local machine before deploying them to the production Google Cloud Functions service.

Note

The Emulator only supports Node v6.x.x. It does not support Node v8.x.x or Python.

How do I get started?

  1. Write a function:

     mkdir helloWorld
     cd helloWorld
     touch index.js
     echo 'exports.helloWorld = (req, res) => res.send("Hello, World!");' > index.js
    
  2. Install the Emulator:

    NPM:

     npm install -g @google-cloud/functions-emulator
    

    Yarn:

     yarn global add @google-cloud/functions-emulator
    

    Or read more in the detailed installation instructions.

  3. Start the Emulator:

     functions start
    
  4. Deploy your function:

     functions deploy helloWorld --trigger-http
    

    Get help deploying a function with functions deploy --help.

  5. Call your function:

     functions call helloWorld
    
  6. View the logs:

     functions logs read
    

Where is the documentation?

For a quick reference, the Emulator CLI is self-documenting. Run the following to get help with the CLI:

functions --help

For everything else see the How-To Guides.

Contributing

To give feedback, report a bug, or request a feature, please open an issue.

To contribute a change, check out the contributing guide.

License

Copyright 2017, Google, Inc.

Licensed under the Apache License, Version 2.0

See the full license.

You can’t perform that action at this time.