0.0.2 • Published 5 months ago

astro-supabase v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

astro-supabase

Astro integration for displaying Supabase tables in the Dev Toolbar.

Prerequisites

Follow this tutorial for setting up your Supabase credentials and client.

Usage

Installation

# 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

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.