Skip to content

Commit

Permalink
Merge pull request #956 from supabase/deno-readme-install
Browse files Browse the repository at this point in the history
docs: Add Deno how-to to README.md
  • Loading branch information
mansueli authored Jan 23, 2024
2 parents 2b8c05f + f68b028 commit 7cea02e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key

### UMD

You can now use plain `<script>`s to import supabase-js from CDNs, like:
You can use plain `<script>`s to import supabase-js from CDNs, like:

```html
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
Expand All @@ -48,7 +48,7 @@ Then you can use it from a global `supabase` variable:

### ESM

You can now use type="module" `<script>`s to import supabase-js from CDNs, like:
You can use `<script type="module">` to import supabase-js from CDNs, like:

```html
<script type="module">
Expand All @@ -60,6 +60,15 @@ You can now use type="module" `<script>`s to import supabase-js from CDNs, like:
</script>
```


### Deno

You can use supabase-js in the Deno runtime via esm.sh:

```js
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2'
```

### Custom `fetch` implementation

`supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:
Expand Down

0 comments on commit 7cea02e

Please sign in to comment.