Back to Gatsby

Hello World function example

examples/functions-hello-world/README.md

2.20.0907 B
Original Source

Hello World function example

This example shows off the simplest possible Function.

  1. Start developing.

    To get started clone this repo locally and run npm install to add all necessary packages.

    shell
    cd examples/functions-hello-world
    npm install
    npm run develop
    
  2. Open the code and start customizing!

    Your site is now running at http://localhost:8000! You can use the UI on the index page to test the functions or directly access them at http://localhost:8000/api/hello-world

    Try editing the text in src/api/hello-world.js to e.g. Hello Gatsby Functions and then re-running curl.

  3. Deploy

You can deploy this example on Gatsby Cloud by copying the example into a new repo and connecting that to Gatsby Cloud.