13 lines
559 B
TypeScript
13 lines
559 B
TypeScript
|
|
import path from 'node:path';
|
||
|
|
|
||
|
|
export const config = {
|
||
|
|
port: parseInt(process.env.PORT ?? '3050', 10),
|
||
|
|
dataDir: process.env.DATA_DIR ?? path.resolve('data'),
|
||
|
|
// Gates recipient management + revoke. Unset disables admin routes
|
||
|
|
// entirely (503) rather than refusing to start — push/pull/grant for
|
||
|
|
// already-registered recipients keep working regardless.
|
||
|
|
adminPassword: process.env.ADMIN_PASSWORD || null,
|
||
|
|
// Replay-protection window for signed requests.
|
||
|
|
requestMaxSkewSeconds: parseInt(process.env.REQUEST_MAX_SKEW_SECONDS ?? '300', 10),
|
||
|
|
};
|