If a SRV URI prefix is used it requires a FQDN for mongodb. When running in devenv, we don't have a FQDN for mongodb, so we need to relax this requirement, as it throws the following error:
throw new error_1.MongoAPIError('URI must include hostname, domain name, and tld');
This is not needed for development use cases, so lets remove the SRV prefix if NODE_ENV is set to development.
Description
If a SRV URI prefix is used it requires a FQDN for mongodb. When running in devenv, we don't have a FQDN for mongodb, so we need to relax this requirement, as it throws the following error:
throw new error_1.MongoAPIError('URI must include hostname, domain name, and tld');
This is not needed for development use cases, so lets remove the SRV prefix if NODE_ENV is set to development.