mirror of
https://github.com/Routstr/routstrd.git
synced 2026-10-05 20:38:22 +00:00
- Add optional daemonUrl field to RoutstrdConfig - Update callDaemon and isDaemonRunning to use configurable base URL - Disable auto-start when daemonUrl is set (Option A) - Gate local-only commands: onboard, start, restart, mode, logs, service install
24 lines
747 B
TypeScript
24 lines
747 B
TypeScript
const HOME = process.env.HOME || process.env.USERPROFILE || "";
|
|
|
|
export const CONFIG_DIR = process.env.ROUTSTRD_DIR || `${HOME}/.routstrd`;
|
|
export const SOCKET_PATH = process.env.ROUTSTRD_SOCKET || `${CONFIG_DIR}/routstrd.sock`;
|
|
export const PID_FILE = process.env.ROUTSTRD_PID || `${CONFIG_DIR}/routstrd.pid`;
|
|
export const DB_PATH = `${CONFIG_DIR}/routstr.db`;
|
|
export const CONFIG_FILE = `${CONFIG_DIR}/config.json`;
|
|
export const LOGS_DIR = `${CONFIG_DIR}/logs`;
|
|
|
|
export interface RoutstrdConfig {
|
|
port: number;
|
|
provider: string | null;
|
|
cocodPath: string | null;
|
|
mode?: "xcashu" | "apikeys";
|
|
daemonUrl?: string;
|
|
}
|
|
|
|
export const DEFAULT_CONFIG: RoutstrdConfig = {
|
|
port: 8008,
|
|
provider: null,
|
|
cocodPath: null,
|
|
mode: "apikeys",
|
|
};
|