This repo is a companion to the Server-Side GraphQL in Next.js course on Frontend Masters.
Here's a link to the Course Notes
This course repository requires Node version 20+ and a TursoDB account. More details can be found in the course notes.
- Fork/Clone the repo
- Checkout the
server/demo
branch - Install the Dependencies with
npm install
- Create a Turso DB account (free)
- Follow the instructions to make a new DB (you don’t need a replica)
- Follow instructions to download the CLI and authenticate
- Using the CLI, generate a token for your db with this command
turso db tokens create [your db name]
- Create a
.env
file on the root and add these environment variables:
TURSO_CONNECTION_URL="your turso db url"
TURSO_AUTH_TOKEN="your db token"
- Push the schema to your Turso DB with this command
npm run db:push