Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(env-variables): Add cURL example for refresh endpoint #10829

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 enviroment variable when running the l

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 with `curl -X POST http://localhost:8000/__refresh`.
riddla marked this conversation as resolved.
Show resolved Hide resolved

## 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