decentralised sync engine
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: constellation url env var

serenity 914a9a81 cba52094

+20
+4
.example.env
··· 9 9 # defaults to did:web:localhost 10 10 SERVICE_DID="did:web:localhost" 11 11 12 + # constellation instance. provide the full url. 13 + # defaults to the public microcosm.blue constellation instance. 14 + CONSTELLATION_URL="https://constellation.microcosm.blue/" 15 + 12 16 # required. 13 17 # owner did 14 18 # used to verify ownership of this lattice and its related channels
+16
src/lib/env.ts
··· 29 29 } 30 30 export const SERVICE_DID = serviceDidParsed ?? "did:web:localhost"; 31 31 32 + 33 + const constellationUrl = process.env.CONSTELLATION_URL; 34 + let constellationUrlParsed: URL | undefined; 35 + try { 36 + constellationUrlParsed = new URL(constellationUrl ?? ""); 37 + } catch (err) { 38 + 39 + 40 + console.warn( 41 + "Invalid CONSTELLATION_URL. Please ensure that the environment variable is a valid URL.", 42 + ); 43 + console.warn("Falling back to default constellation instance."); 44 + console.warn(err); 45 + } 46 + export const CONSTELLATION_URL = constellationUrlParsed ?? new URL("https://constellation.microcosm.blue/"); 47 + 32 48 const ownerDid = process.env.OWNER_DID; 33 49 const { 34 50 success: ownerDidParseSuccess,