This repository is a fork of the official Supabase JS library. It provides an isomorphic JavaScript client for interacting with Supabase services, including:
- Querying your Supabase database.
- Subscribing to real-time events.
- Uploading and downloading files.
- Browsing TypeScript examples.
- Invoking PostgreSQL functions via RPC.
- Invoking Supabase Edge Functions.
- Querying
pgvectorfor AI-related functionalities.
Supabase is an open-source Firebase alternative. This library serves as the JavaScript client for Supabase, making it simple to interact with Supabase APIs in your web or Node.js applications.
Visit the official Supabase website: https://supabase.com
Install the library using npm or yarn:
# Using npm
npm install @supabase/supabase-js
# Using yarn
yarn add @supabase/supabase-jsHere's a basic example of how to initialize the client and make a query:
import { createClient } from '@supabase/supabase-js'
const supabaseUrl = 'https://your-supabase-url.supabase.co'
const supabaseKey = 'your-anon-key'
const supabase = createClient(supabaseUrl, supabaseKey)
// Example: Fetch data from a table
const { data, error } = await supabase
.from('your_table_name')
.select('*')
if (error) {
console.error('Error fetching data:', error)
} else {
console.log('Data:', data)
}For more examples, refer to the official documentation.
This project is licensed under the MIT License.
Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request.
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch-name. - Make your changes and commit them:
git commit -m 'Add some feature'. - Push your branch:
git push origin feature-branch-name. - Open a pull request.
This project is a fork of the official Supabase JS repository. Special thanks to the Supabase team for their amazing work.