WaDBConfig constructor

WaDBConfig({
  1. String? user,
  2. String? pass,
  3. String? host,
  4. String? port,
  5. String? dbName,
  6. String? auth,
  7. bool? enable,
})

Implementation

WaDBConfig({
  String? user,
  String? pass,
  String? host,
  String? port,
  String? dbName,
  String? auth,
  bool? enable,
}) {
  this.user =
      user ?? env['MONGO_INITDB_ROOT_USERNAME'] ?? 'database_username';
  this.pass =
      pass ?? env['MONGO_INITDB_ROOT_PASSWORD'] ?? 'database_password';
  this.auth = auth ?? env['MONGO_INITDB_ROOT_AUTH'] ?? 'admin';
  this.host = host ?? env['MONGO_CONNECTION'] ?? 'localhost';
  this.port = port ?? env['MONGO_PORT'] ?? '27017';
  this.dbName = env['MONGO_INITDB_DATABASE'] ?? 'database_name';
  this.enable = enable ?? true;
}