diff --git a/.env.example b/.env.example index 96487c8..5cf6e15 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,9 @@ # HTTP port (default: 3003) PORT=3003 +# Endorser API base URL (default: https://api.endorser.ch) +# ENDORSER_URL=https://api.endorser.ch + # Firebase Admin: inline service account JSON (one line). # If unset, uses Application Default Credentials (e.g. GOOGLE_APPLICATION_CREDENTIALS). # FIREBASE_SERVICE_ACCOUNT_JSON={"type":"service_account",...} diff --git a/src/env.ts b/src/env.ts index f4378ae..dc2d113 100644 --- a/src/env.ts +++ b/src/env.ts @@ -1,3 +1,7 @@ import { config } from "dotenv"; config(); + +/** Base URL for the Endorser API server. */ +export const ENDORSER_URL = + process.env.ENDORSER_URL ?? "https://api.endorser.ch";