Get rid of DITTO_RELAY, derive from LOCAL_DOMAIN
This commit is contained in:
parent
78f638e633
commit
16ba224124
|
@ -35,12 +35,9 @@ const Conf = {
|
||||||
['sign', 'verify'],
|
['sign', 'verify'],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
get relay() {
|
get relay(): `wss://${string}` | `ws://${string}` {
|
||||||
const value = Deno.env.get('DITTO_RELAY');
|
const { protocol, host } = Conf.url;
|
||||||
if (!value) {
|
return `${protocol === 'https:' ? 'wss:' : 'ws:'}//${host}/relay`;
|
||||||
throw new Error('Missing DITTO_RELAY');
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
},
|
},
|
||||||
get localDomain() {
|
get localDomain() {
|
||||||
return Deno.env.get('LOCAL_DOMAIN') || 'http://localhost:8000';
|
return Deno.env.get('LOCAL_DOMAIN') || 'http://localhost:8000';
|
||||||
|
|
Loading…
Reference in New Issue