Skip to content

Commit

Permalink
docs(env-variables): Add cURL example for refresh endpoint (#10829)
Browse files Browse the repository at this point in the history
<!--
  Have any questions? Check out the contributing docs at https://gatsby.app/contribute, or
  ask in this Pull Request and a Gatsby maintainer will be happy to help :)
-->

## Description

I added a cURL example for the refresh endpoint e.g. http://localhost:8000/__refresh.

## Related Issues

Related to #10328.
  • Loading branch information
riddla authored and calcsam committed Jan 5, 2019
1 parent ad4c5d5 commit 8f56b04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ Gatsby also allows you to specify another environment variable when running the

If set to true, this will expose a `/__refresh` webhook that is able to receive `POST` requests to _refresh_ the sourced content. This exposed webhook can be triggered whenever remote data changes, which means you can update your data without re-launching the development server.

You can trigger this endpoint locally for example on Unix-based operating systems (like Ubuntu and MacOS) you can use `curl -X POST http://localhost:8000/__refresh`.

## Additional Environments (Staging, Test, etc)

As noted above `NODE_ENV` is a reserved environment variable in Gatsby as it is needed by the build system to make key optimizations when compiling React and other modules. For this reason it is necessary to make use of a secondary environment variable for additional environment support, and manually make the environment variables available to the client-side code.
Expand Down

0 comments on commit 8f56b04

Please sign in to comment.