Skip to content

Commit

Permalink
mention deno support in the README
Browse files Browse the repository at this point in the history
It seems to work fine, and I have a demo bot with it https://github.com/sigmaSd/deno-matrix-bot
  • Loading branch information
sigmaSd authored May 28, 2023
1 parent b29e1e9 commit b68928c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Matrix JavaScript SDK

This is the [Matrix](https://matrix.org) Client-Server SDK for JavaScript and TypeScript. This SDK can be run in a
browser or in Node.js.
browser or in Node.js or in Deno.

The Matrix specification is constantly evolving - while this SDK aims for maximum backwards compatibility, it only
guarantees that a feature will be supported for at least 4 spec releases. For example, if a feature the js-sdk supports
Expand Down Expand Up @@ -55,6 +55,17 @@ client.publicRooms(function (err, data) {
See below for how to include libolm to enable end-to-end-encryption. Please check
[the Node.js terminal app](examples/node) for a more complex example.

## In Deno

```javascript
import * as sdk from "npm:matrix-js-sdk";
const client = sdk.createClient({ baseUrl: "https://matrix.org" });
await client.publicRooms(function (err, data) {
console.log("Public Rooms: %s", JSON.stringify(data));
});
```
you can run with `deno run --allow-net myclient.ts`

To start the client:

```javascript
Expand Down

0 comments on commit b68928c

Please sign in to comment.