Skip to content

Commit 838836b

Browse files
author
EspressoTrip-v2
committed
comments
1 parent 9d48efb commit 838836b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/bin/mongoReplicas.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#!/usr/bin/env node
22
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+
*/
311
async function mongoReplicas() {
412
const srvUrl = process.argv[3];
513
const url = new URL(srvUrl);

0 commit comments

Comments
 (0)