Skip to content

Commit 78f2e4a

Browse files
AJRdevnodkz
authored andcommitted
feat: add env variable MONGOMS_DOWNLOAD_MIRROR to be able to specify a mirror download url for binary download (#93)
1 parent b1a290b commit 78f2e4a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ MONGOMS_PLATFORM=linux
7575
MONGOMS_ARCH=x64
7676
MONGOMS_VERSION=3
7777
MONGOMS_DEBUG=1 # also available case-insensitive values: "on" "yes" "true"
78+
MONGOMS_DOWNLOAD_MIRROR=url # your mirror url to download the mongodb binary
7879
```
7980
8081
### Replica Set start:

src/util/MongoBinaryDownloadUrl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export default class MongoBinaryDownloadUrl {
2525

2626
async getDownloadUrl(): Promise<string> {
2727
const archive = await this.getArchiveName();
28-
return `https://fastdl.mongodb.org/${this.platform}/${archive}`;
28+
return `${process.env?.MONGOMS_DOWNLOAD_MIRROR || 'https://fastdl.mongodb.org'}/
29+
${this.platform}/${archive}`;
2930
}
3031

3132
async getArchiveName(): Promise<string> {

0 commit comments

Comments
 (0)