mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 15:25:45 +00:00
feat: ( payment ) create payment microservice
This commit is contained in:
21
apps/edr-payment-api/src/config/app.config.ts
Normal file
21
apps/edr-payment-api/src/config/app.config.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { registerAs } from "@nestjs/config";
|
||||
|
||||
export default registerAs("app", () => ({
|
||||
port: parseInt(process.env.PORT ?? "3003", 10),
|
||||
/**
|
||||
* Shared secret for service-to-service auth (apps -> /payments/*, payment -> mark-paid).
|
||||
* Required in production; in development an empty value disables the guard with a warning.
|
||||
* TODO: integrate @tria-plc IAM / mTLS as the long-term mechanism (docs/payment-service §14).
|
||||
*/
|
||||
serviceAuthToken: process.env.SERVICE_AUTH_TOKEN ?? "",
|
||||
reconciliation: {
|
||||
/** How often the stale-intent sweep runs. */
|
||||
sweepIntervalMs: parseInt(
|
||||
process.env.RECONCILE_SWEEP_INTERVAL_MS ?? "60000",
|
||||
10,
|
||||
),
|
||||
/** An intent is "stale" when non-terminal and untouched for this long. */
|
||||
staleAfterMs: parseInt(process.env.RECONCILE_STALE_AFTER_MS ?? "60000", 10),
|
||||
batchSize: parseInt(process.env.RECONCILE_BATCH_SIZE ?? "20", 10),
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user