examples/framework-astro/README.md
Keystone can be used as a data engine in Astro applications without having to host a separate Keystone server.
This is made possible by Keystone's getContext API.
This example shows how this can be achieved with Astro SSR. It shows how to pass through a session to Keystone using withSession() to filter posts based on the browser used - this example is purely for the demonstration of session and access control when using getContext in Astro.
To run the example for yourself you will perform the following step:
pnpm installcd exmaples/framework-astro)pnpm keystone devhttp://localhost:4000pnpm devhttp://localhost:3000The astro.config.mjs file contains a vite configuration object, this should not be required outside of the Keystone Monorepo
You can play with this example online in a web browser using the free codesandbox.io service. To launch this example, open the URL https://githubbox.com/keystonejs/keystone/tree/main/examples/framework-astro. You can also fork this sandbox to make your own changes.