- Run
npx degit grafbase/grafbase/examples/nextauthjs-jwt-provider grafbase-with-nextauthjs-jwt-providerto clone this example - Change directory into the new folder
cd grafbase-with-nextauthjs-jwt-provider - Run
cp .env.example .env - Open
.envin your code editor and provide your Grafbase API endpoint, API key, NextAuth Secret, and your GitHub Application Client ID and Secret to enable sign-in. - Run
cp grafbase/.env.example grafbase.envand provide the same secret you have in your root.env - 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:
- NextAuth.js Documentation
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.