Files
supabase/web/docs/library/getting-started.mdx
T

59 lines
1.3 KiB
Plaintext
Executable File

---
id: getting-started
title: Getting Started
description: 'How to install Supabase and start interacting with your database'
---
## Installing
```bash
npm install --save @supabase/supabase-js
# OR
yarn install @supabase/supabase-js
```
## Initializing
```js
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()`
```js
createClient('supabaseURL', 'supabaseKey', OPTIONS)
```
#### `supabaseURL: string`
The unique Supabase URL which is supplied when you create a new project in [your project dashboard](https://app.supabase.io).
#### `supabaseKey: string`
The unique Supabase Key which is supplied when you create a new project in [your project dashboard](https://app.supabase.io).
#### `OPTIONS: object?`
```js
/**
* @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,
}
```