dsql-admin/dsql-app/init/init-sql/(functions)/check-env-variables.ts

19 lines
635 B
TypeScript
Raw Normal View History

2025-01-13 08:00:21 +00:00
export default async function initSQLCheckEnvVariables() {
if (!process.env.DSQL_DB_TARGET_IP_ADDRESS) {
console.log("DSQL_DB_TARGET_IP_ADDRESS env is not set");
process.exit(1);
}
if (!process.env.DSQL_DB_PASSWORD) {
console.log("DSQL_DB_PASSWORD env is not set");
process.exit(1);
}
if (!process.env.DSQL_DB_READ_ONLY_PASSWORD) {
console.log("DSQL_DB_READ_ONLY_PASSWORD env is not set");
process.exit(1);
}
if (!process.env.DSQL_DB_FULL_ACCESS_PASSWORD) {
console.log("DSQL_DB_FULL_ACCESS_PASSWORD env is not set");
process.exit(1);
}
}