Skip to content

Instantly share code, notes, and snippets.

@aerobless
Last active June 29, 2018 08:52
Show Gist options
  • Save aerobless/7a732978af853efd2c24b09012496913 to your computer and use it in GitHub Desktop.
Save aerobless/7a732978af853efd2c24b09012496913 to your computer and use it in GitHub Desktop.
Commands for local testing of gfc
# 1. Install gfc emulator
npm install -g @google-cloud/functions-emulator
# 2. Set correct project
functions config set projectId YOUR_PROJECT_ID
# 3. Get correct version of Node.js (works for *nix systems)
npm install -g n
n 6.11.5
# 4. Launch the emulator
functions start
functions deploy YOUR_ENTRYPOINT_FUNCTION --trigger-http
#5. Stop or kill the emulator
functions stop
functions kill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment