Express server with vanilla HTML/JS showing Hygraph Preview SDK integration.
-
Install dependencies:
npm install
-
Update endpoint in
server.js:const HYGRAPH_ENDPOINT = 'https://your-region.cdn.hygraph.com/content/your-project-id/master';
-
Run the server:
npm run dev
The server fetches data from Hygraph and renders HTML pages. The SDK is included via script tag for preview functionality.
Standalone: Open in your browser, hover over content to see edit buttons.
Studio Integration: Use this URL in your Hygraph preview settings.
Uses the recipe schema from ../schema.json. See main examples README for setup.