Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexnguyennz/astro-supabase
Supabase toolbar app for Astro sites
https://github.com/alexnguyennz/astro-supabase
astro astro-integration supabase
Last synced: about 2 months ago
JSON representation
Supabase toolbar app for Astro sites
- Host: GitHub
- URL: https://github.com/alexnguyennz/astro-supabase
- Owner: alexnguyennz
- License: mit
- Created: 2023-12-12T01:32:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-18T01:59:16.000Z (about 1 year ago)
- Last Synced: 2024-09-26T09:06:55.031Z (3 months ago)
- Topics: astro, astro-integration, supabase
- Language: TypeScript
- Homepage:
- Size: 323 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# astro-supabase
Astro integration for displaying Supabase tables in the Dev Toolbar.
## Prerequisites
Follow [this tutorial](https://docs.astro.build/en/guides/backend/supabase/) for setting up your Supabase credentials and client.
## Usage
### Installation
```sh
# 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:
```sh
pnpm add vite --save-dev
``````diff
// 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:
```sh
# 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.