add config values for external nostr viewer back to source code

This commit is contained in:
Siddharth Singh 2024-06-24 02:02:58 +05:30
parent 39fb1eee5f
commit 60b4ea4643
No known key found for this signature in database

View file

@ -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.