Coder Social home page Coder Social logo

justinbeckwith / cloud-functions-emulator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlearchive/cloud-functions-emulator

0.0 3.0 0.0 2.62 MB

A local emulator for Google Cloud Functions that allows you to deploy, run, and debug your Cloud Functions on your local machine before deploying them to the production Google Cloud Functions service.

Home Page: https://github.com/GoogleCloudPlatform/cloud-functions-emulator/wiki

License: Apache License 2.0

JavaScript 100.00%

cloud-functions-emulator's Introduction

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.

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.

cloud-functions-emulator's People

Contributors

amachino avatar jasonpolites avatar jmdobry avatar kpruden avatar laurenzlong avatar max avatar saffy avatar swalkowski avatar tinaliang avatar tswast avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.