We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d48efb commit 838836bCopy full SHA for 838836b
1 file changed
src/bin/mongoReplicas.ts
@@ -1,5 +1,13 @@
1
#!/usr/bin/env node
2
import { resolveSrv } from 'dns/promises';
3
+
4
+/**
5
+ * NPX script to resolve MongoDB SRV records.
6
+ * @example npx @journeyapps/https-proxy-socket mongo-replicas mongodb+srv://<username>:<password>@cluster1.vlnzcbp.mongodb.net
7
+ * @example npx @journeyapps/https-proxy-socket mongo-replicas mongodb+srv://cluster1.vlnzcbp.mongodb.net
8
+ *
9
+ * @returns An object with a `replicas` property containing the resolved host:port pairs.
10
+ */
11
async function mongoReplicas() {
12
const srvUrl = process.argv[3];
13
const url = new URL(srvUrl);
0 commit comments