mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
add config values for external nostr viewer back to source code
This commit is contained in:
parent
39fb1eee5f
commit
60b4ea4643
1 changed files with 8 additions and 0 deletions
|
|
@ -63,6 +63,14 @@ class Conf {
|
||||||
static get localDomain(): string {
|
static get localDomain(): string {
|
||||||
return Deno.env.get('LOCAL_DOMAIN') || `http://localhost:${Conf.port}`;
|
return Deno.env.get('LOCAL_DOMAIN') || `http://localhost:${Conf.port}`;
|
||||||
}
|
}
|
||||||
|
/** Link to an external nostr viewer. */
|
||||||
|
static get externalDomain(): string {
|
||||||
|
return Deno.env.get('NOSTR_EXTERNAL') || 'https://njump.me';
|
||||||
|
}
|
||||||
|
/** Get a link to a nip19-encoded entity in the configured external viewer. */
|
||||||
|
static external(path: string) {
|
||||||
|
return new URL(path, Conf.externalDomain);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Heroku-style database URL. This is used in production to connect to the
|
* Heroku-style database URL. This is used in production to connect to the
|
||||||
* database.
|
* database.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue