This repo was initiated by cloning this example.
- Run
pnpm install
to install dependencies - Run
npx grafbase dev
to start local dev server with your schema - Run
npm run dev
, oryarn dev
(in a new terminal) - Visit http://localhost:3000
- The below goes for both for the frontend and backend (client, edge & server function)
- Logs are captured in Sentry
- Unhandled exceptions are logged in Sentry automatically
- Manually log an error by running
Sentry.captureException(new Error("custom error"));
orSentry.captureException(error);
in catch statement - Manually log a message by running
Sentry.captureMessage("this is a debug message");
. The level isinfo
by default - Errors and messages will show up as Issues in Sentry. In order to move the out of the issues stream do one of the following:
- Mark as resolved when it's been fixed
- Set status to
Archived
- Push to main (This will deploy to Grafbase and Vercel)
- Put all secrets for NextJs in
.env.local
(dev) or in Vercel (prod) - Generic non secret env-variables are put in
.env
- Included in repo - Environment specific env-variables are put in
.env.development
or.env.production
- Included in repo