ditto/src/config.ts

27 lines
637 B
TypeScript
Raw Normal View History

/** Application-wide configuration. */
const Conf = {
get nsec() {
return Deno.env.get('DITTO_NSEC');
},
2023-07-09 17:55:37 +00:00
get relay() {
return Deno.env.get('DITTO_RELAY');
},
get localDomain() {
return Deno.env.get('LOCAL_DOMAIN') || 'http://localhost:8000';
},
get postCharLimit() {
return Number(Deno.env.get('POST_CHAR_LIMIT') || 5000);
},
get adminEmail() {
return Deno.env.get('ADMIN_EMAIL') || 'webmaster@localhost';
},
get poolRelays() {
return (Deno.env.get('RELAY_POOL') || '').split(',').filter(Boolean);
},
get publishRelays() {
return ['wss://relay.mostr.pub'];
},
};
2023-03-05 04:10:56 +00:00
export { Conf };