You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
584 B
JavaScript
21 lines
584 B
JavaScript
5 years ago
|
"use strict";
|
||
|
|
||
|
const Promise = require("bluebird");
|
||
|
const autodiscoverClientConfiguration = require(".");
|
||
|
|
||
|
return Promise.try(() => {
|
||
|
return autodiscoverClientConfiguration.discover("pixie.town");
|
||
|
}).then((data) => {
|
||
|
console.log(data);
|
||
|
/*
|
||
|
{ method: 'wellKnown',
|
||
|
homeserver: 'https://pixie.town',
|
||
|
identityServer: 'https://pixie.town',
|
||
|
raw:
|
||
|
{ 'm.homeserver': { base_url: 'https://pixie.town' },
|
||
|
'm.identity_server': { base_url: 'https://pixie.town' } } }
|
||
|
*/
|
||
|
}).catch(autodiscoverClientConfiguration.LookupFailed, (error) => {
|
||
|
console.error(error.message);
|
||
|
});
|