You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-30 04:23:07 +03:00
Add examples to show it working in node and browser
This commit is contained in:
11
examples/node/app.js
Normal file
11
examples/node/app.js
Normal file
@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
console.log("Loading node sdk");
|
||||
|
||||
var matrix = require("./lib/matrix");
|
||||
matrix.request(require("request"));
|
||||
|
||||
var client = matrix.createClient("http://matrix.org");
|
||||
client.publicRooms(function (err, data) {
|
||||
console.log("data %s", JSON.stringify(data));
|
||||
console.error("err %s", JSON.stringify(err));
|
||||
});
|
Reference in New Issue
Block a user