Getting Started

Installing

npm install --save @supabase/supabase-js
# OR
yarn install @supabase/supabase-js

Initializing

import { createClient } from '@supabase/supabase-js'
// Create a single supabase client for interacting with your database
const supabase = createClient("https://xyzcompany.supabase.co", "1a2b-3c4d-5e6f-7g8h");

Reference

createClient()

createClient('supabaseURL', 'supabaseKey', OPTIONS)

supabaseURL: string

The unique Supabase URL which is supplied when you create a new project in your project dashboard.

supabaseKey: string

The unique Supabase Key which is supplied when you create a new project in your project dashboard.

OPTIONS: object?

/**
* @param {boolean} [allowBulkUpdates=false]
* Blocks the user from accidentally updating many rows.
* Can also be overriden on individual calls to update().
*
* @param {boolean} [allowBulkDeletes=false]
* Blocks the user from accidentally deleting many rows.
* Can also be overriden on individual calls to update().
*/
const options = {
allowBulkUpdates: false,
allowBulkDeletes: false,
}