Astro integration for displaying Supabase tables in the Dev Toolbar.
Follow this tutorial for setting up your Supabase credentials and client.
# Using NPM
npm install astro-supabase
# Using Yarn
yarn add astro-supabase
# Using PNPM
pnpm add astro-supabase
If you're using pnpm, you'll need to install vite
separately:
pnpm add vite --save-dev
// astro.config.mjs
import { defineConfig } from "astro/config";
+ import { loadEnv } from "vite";
+ import supabase from "astro-supabase";
// Load your Supabase credentials from your .env file
const { SUPABASE_URL, SUPABASE_ANON_KEY } = loadEnv(
"",
process.cwd(),
"SUPABASE",
);
export default defineConfig({
integrations: [
supabase({
supabaseKey: SUPABASE_ANON_KEY,
supabaseUrl: SUPABASE_URL,
}),
],
});
Run your development server:
# Using NPM
npm run dev
# Using Yarn
yarn run dev
# Using PNPM
pnpm run dev
Click the Supabase tab in the dev toolbar to see your tables.