The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: nextjs13 edge ISR not yet supported.
thorwebdevec4159067c2c
diff --git a/examples/caching/with-nextjs-13/README.md b/examples/caching/with-nextjs-13/README.mdindex 48288a664d1..a71d2e3b114 100644--- a/examples/caching/with-nextjs-13/README.md+++ b/examples/caching/with-nextjs-13/README.md@@ -1,12 +1,18 @@-# Caching data at the edge with Next.js 13 and Supabase+# Caching data with Next.js 13 and SupabaseThis is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).-It showcases how to [fetch and cache data](// See the docs: https://beta.nextjs.org/docs/data-fetching/caching) at the Edge with Next.js and Supabase.+It showcases how to [fetch and cache data](https://beta.nextjs.org/docs/data-fetching/caching) with Next.js and Supabase.## Getting Started-First, start Supabase locally and seed your local development database with the [Supabase CLI](https://supabase.com/docs/reference/cli):+Download this example:++```+curl https://codeload.github.com/supabase/supabase/tar.gz/master | tar -xz --strip=3 supabase-master/examples/caching/with-nextjs-13+```++Then, start Supabase locally and seed your local development database with the [Supabase CLI](https://supabase.com/docs/reference/cli):```bashsupabase startdiff --git a/examples/caching/with-nextjs-13/app/page.tsx b/examples/caching/with-nextjs-13/app/page.tsxindex a947ad0efd5..0969a3a94ff 100644--- a/examples/caching/with-nextjs-13/app/page.tsx+++ b/examples/caching/with-nextjs-13/app/page.tsx@@ -1,4 +1,4 @@-// Caching data at the edge with Next.js 13 and Supabase+// Caching data with Next.js 13 and Supabase// See the docs: https://beta.nextjs.org/docs/data-fetching/cachingimport 'server-only'import { createClient } from '@supabase/supabase-js'@@ -6,12 +6,10 @@ import { createClient } from '@supabase/supabase-js'const supabase = createClient(process.env.NEXT_PUBLIC_SUPABASE_URL ?? 'http://localhost:54321',process.env.SUPABASE_SERVICE_ROLE_KEY ??- 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSJ9.vI9obAHOGyVVKa3pD--kJlyxp-Z2zV9UUMAhKpNLAcU'+ 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSJ9.vI9obAHOGyVVKa3pD--kJlyxp-Z2zV9UUMAhKpNLAcU',+ { global: { fetch } } // Note: this is not required as supabase-js uses the global fetch when available!)-export const config = {- runtime: 'experimental-edge',-}export const revalidate = 60 // revalidate this page at most every 60 secondsexport default async function PostList() {