Skip to content

Commit b5b6b01

Browse files
committed
feat(proxy): show the configuration of the proxy at startup
1 parent 9bc107b commit b5b6b01

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ const PORT: string = process.env?.PORT || '8080'
55
const REGISTRY_HOST: string = process.env?.REGISTRY_HOST || 'registry.hub.docker.com'
66
const HTTPS: boolean = true
77

8+
const settingsFormatted: string = [
9+
['PORT', PORT],
10+
['REGISTRY_HOST', REGISTRY_HOST],
11+
['HTTPS', HTTPS],
12+
]
13+
.map(([key, value]) => ` - ${key}=${value}`)
14+
.reduce((a, b) => `${a}\n${b}`)
15+
16+
console.log(`Configuration:\n${settingsFormatted}\n`)
17+
818
const URL_REGEX = /^\/([\w\d]*)\/(?:([\s\S]+)\/(manifests|blobs)\/([\w\d:]+))?$/
919

1020
const server = http.createServer((req, res) => {

0 commit comments

Comments
 (0)