WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto
at main 29 lines 942 B view raw
1export interface CliConfig { 2 databaseUrl: string; 3 forumDid: string; 4 pdsUrl: string; 5 forumHandle: string; 6 forumPassword: string; 7 missing: string[]; 8} 9 10/** 11 * Load CLI configuration from environment variables. 12 * Returns a config object with a `missing` array listing absent required vars. 13 */ 14export function loadCliConfig(): CliConfig { 15 const missing: string[] = []; 16 17 const databaseUrl = process.env.DATABASE_URL ?? ""; 18 const forumDid = process.env.FORUM_DID ?? ""; 19 const pdsUrl = process.env.PDS_URL ?? "https://bsky.social"; 20 const forumHandle = process.env.FORUM_HANDLE ?? ""; 21 const forumPassword = process.env.FORUM_PASSWORD ?? ""; 22 23 if (!databaseUrl) missing.push("DATABASE_URL"); 24 if (!forumDid) missing.push("FORUM_DID"); 25 if (!forumHandle) missing.push("FORUM_HANDLE"); 26 if (!forumPassword) missing.push("FORUM_PASSWORD"); 27 28 return { databaseUrl, forumDid, pdsUrl, forumHandle, forumPassword, missing }; 29}