mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-01 04:34:24 +01:00
add config values for external nostr viewer back to source code
This commit is contained in:
@@ -63,6 +63,14 @@ class Conf {
|
||||
static get localDomain(): string {
|
||||
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
|
||||
* database.
|
||||
|
||||
Reference in New Issue
Block a user