appview

tcmts.atproto.appview · #4zx3uhr6 · function · runs on the server

uses process

Where a browser resolves handles and reads profiles: configure's appview, else $ATPROTO_APPVIEW, else the network's own directory (a private one's), else Bluesky's public appview.

import { ATPROTO_CONFIG, directory } from "#codebase/tcmts/atproto";

export const appview = (): string =>
  (ATPROTO_CONFIG.appview ?? process.env.ATPROTO_APPVIEW)?.replace(/\/+$/, "") ||
  directory() ||
  "https://public.api.bsky.app"

uses

used by