stacks-network / sbtc-bridge-api

GNU Affero General Public License v3.0
6 stars 4 forks source link

mongo: uri: enforce SRV URIs for non development use cases #73

Closed EmbeddedAndroid closed 1 year ago

EmbeddedAndroid commented 1 year ago

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.

EmbeddedAndroid commented 1 year ago

This is needed for: https://github.com/stacks-network/sbtc/issues/141