This example uses Next.js 13 experimental app directory — read more
- Run
npx degit grafbase/grafbase/examples/nextjs-rsc grafbase-with-nextjs-rscto clone this example - Change directory into the new folder
cd grafbase-with-nextjs-rsc - Run
cp .env.example .env - Open
.envin your code editor and provide your Grafbase API endpoint and API key. Example should be fine fornpx grafbase dev! - Run
npm installoryarn installto install dependencies - Run
npx grafbase@latest devin your terminal - In another terminal, run
npm run devoryarn devand visithttp://localhost:3000
To learn more about Grafbase, take a look at the following resources:
- Grafbase - learn about Grafbase features and API.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.