You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-31 10:22:04 +03:00
15 lines
416 B
JavaScript
15 lines
416 B
JavaScript
"use strict";
|
|
console.log("Loading node sdk");
|
|
|
|
var matrix = require("matrix-js-sdk");
|
|
|
|
var client = matrix.createClient("http://matrix.org");
|
|
client.publicRooms(function (err, data) {
|
|
if (err) {
|
|
console.error("Error: %s", JSON.stringify(err));
|
|
return;
|
|
}
|
|
console.log("data %s", JSON.stringify(data).substring(0, 200));
|
|
console.log("Congratulations! The SDK is working in Node.js!");
|
|
});
|