mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
The Fayda redirect URI registered for local testing is http://localhost:3000/callback, matched exactly by the provider, so the portal has to be the thing listening there. Its dev and preview servers move from 4200 to 3000 and the API moves to 3001. Every hardcoded fallback to http://localhost:3000/api follows — six copies of the same default across libs/api, libs/auth, the portal and the backoffice — otherwise a developer without a .env would have had the app calling itself. e2e is unaffected: it binds its own ports (3011/4302/4303) explicitly.
40 lines
1.9 KiB
Plaintext
40 lines
1.9 KiB
Plaintext
# emaui environment
|
|
#
|
|
# Vite reads this from the workspace root, not from the app directory:
|
|
# apps/portal/vite.config.mts and apps/backoffice/vite.config.mts both set
|
|
# `envDir: '../../'`. So copy this file to ./.env here, at the repo root.
|
|
#
|
|
# cp .env.example .env
|
|
#
|
|
# Only VITE_-prefixed values reach the browser, and everything that does is
|
|
# public — it ships inside the built bundle. Never put a secret here. The Fayda
|
|
# client id, private key and endpoints live in the API's environment only; the
|
|
# frontend never speaks to Fayda directly.
|
|
|
|
# Base URL of the emaapi backend, including the /api prefix.
|
|
# 3001, not 3000: the portal itself takes 3000 in development, because that is
|
|
# the port in the Fayda redirect URI registered for local testing. Set PORT=3001
|
|
# in emaapi's .env to match.
|
|
VITE_BASE_API_URL=http://localhost:3001/api
|
|
|
|
# Serve fixture data instead of calling the API. Any value other than "true"
|
|
# uses the real backend.
|
|
VITE_USE_MOCKS=false
|
|
|
|
# --- Docker Compose only -----------------------------------------------------
|
|
# Host ports published by docker-compose.yml. It also expects per-app env files
|
|
# at apps/portal/.env and apps/backoffice/.env, which can each be a copy of this
|
|
# file. Ignored when running the Vite dev servers, which serve the portal on
|
|
# 3000 and the backoffice on 4201.
|
|
# EMA_PORTAL_PORT=8021
|
|
# EMA_BACKOFFICE_PORT=8022
|
|
|
|
# --- Fayda note --------------------------------------------------------------
|
|
# There is nothing to configure here for Fayda. The portal serves the callback
|
|
# page at /callback and /signup/fayda/callback, and whichever path is registered
|
|
# with Fayda must match the API's FAYDA_REDIRECT_URI exactly.
|
|
#
|
|
# The value being registered first is http://localhost:3000/callback, so the
|
|
# portal's dev server now listens on 3000 and emaapi moves to 3001. Nothing
|
|
# extra to run — `nx serve portal` already binds the right port.
|