cli: try to fallback to env if present

This commit is contained in:
dswbx
2025-02-12 09:52:18 +01:00
parent 2c6a4d2bed
commit d84731d89e
5 changed files with 24 additions and 6 deletions

View File

@@ -76,3 +76,9 @@ export async function getConfigPath(filePath?: string) {
return;
}
export function getConnectionCredentialsFromEnv() {
const dbUrl = process.env.DB_URL;
const dbToken = process.env.DB_TOKEN;
return dbUrl ? { url: dbUrl, authToken: dbToken } : undefined;
}