Skip to content

Commit b588864

Browse files
authored
Merge pull request #260 from ftonato/patch-1
docs: update project's documentation
2 parents 3fa7261 + d32645c commit b588864

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# `supabase-js`
22

3-
An isomorphic Javascript client for Supabase.
3+
An isomorphic JavaScript client for Supabase.
44

5-
- Documentation: https://supabase.io/docs/client/supabase-client
5+
**Documentation:** https://supabase.io/docs/client/supabase-client
66

77
## Usage
88

9+
First of all, you need to install the library:
10+
911
```sh
1012
npm install @supabase/supabase-js
1113
```
1214

15+
Then you're able to import the library and establish the connection with the database:
16+
1317
```js
1418
import { createClient } from '@supabase/supabase-js'
1519

@@ -19,19 +23,26 @@ const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key
1923

2024
### UMD
2125

22-
You can now use plain `<script>`s to import supabase-js from CDNs, like
26+
You can now use plain `<script>`s to import supabase-js from CDNs, like:
27+
28+
```html
29+
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script>
30+
```
31+
or even:
2332

24-
`<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script>`
25-
or
26-
`<script src="https://unpkg.com/@supabase/supabase-js"></script>`.
33+
```html
34+
<script src="https://unpkg.com/@supabase/supabase-js"></script>
35+
```
2736

2837
Then you can use it from a global `supabase` variable:
2938

3039
```html
3140
<script>
32-
const { createClient } = supabase
33-
supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')
34-
...
41+
const { createClient } = supabase
42+
const _supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')
43+
44+
console.log('Supabase Instance: ', _supabase);
45+
// ...
3546
</script>
3647
```
3748

0 commit comments

Comments
 (0)