Running a Gatsby Preview Server
When editing content in a CMS, it’s great to see a preview of changes before they go live.
This can be accomplished by setting up a preview server with Gatsby, for which there are two options:
Roughly, you can follow these steps to enable your own preview server:
gatsby developon a Node.js host like Heroku with the ENABLE_GATSBY_REFRESH_ENDPOINT environment variable enabled. This will configure the develop server to re-source data when it receives a
- Then setup your CMS to ping this URL on the preview server whenever content is changed.
For a managed Preview server without having to create infrastructure yourself, try out Gatsby Cloud. It’s free for personal projects and single-purpose sites, with paid packages for a range of project and company needs.