From 0758c4192fb8834b262fb3a2c4f557b35330c3d6 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Fri, 10 Jul 2026 16:09:57 +0800 Subject: [PATCH] feat(config): add ENDORSER_URL for upcoming Endorser auth Expose the Endorser API base URL from the environment (defaulting to production) so later auth work can call it without hardcoding. --- .env.example | 3 +++ src/env.ts | 4 ++++ 2 files changed, 7 insertions(+) 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";