Skip to content

Commit

Permalink
fix: fix packuments entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Nov 10, 2022
1 parent f6cd2fc commit 7dfd63c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/js/config.js
Expand Up @@ -39,6 +39,7 @@ const populate = (config) => {
healthcheck = '/healthcheck',
metrics = '/metrics',
secure: _secure,
entrypoint = `${_secure ? 'https' : 'http'}://${host}:${port}`,
keepAliveTimeout = 61_000,
headersTimeout = 62_000,
requestTimeout = 30_000
Expand All @@ -54,6 +55,7 @@ const populate = (config) => {
host,
port,
base,
entrypoint,
metrics,
healthcheck,
requestTimeout,
Expand Down
15 changes: 14 additions & 1 deletion src/test/js/app.js
Expand Up @@ -68,7 +68,20 @@ test('is runnable', async () => {
[
'reads packument via GET',
{ url: 'http://localhost:3001/registry/d', method: 'GET'},
{ statusCode: 200, json: {name: 'd', description: 'Property descriptor factory'}}
{ statusCode: 200, json: {
name: 'd',
description: 'Property descriptor factory',
versions: {
'0.1.0': {
name: 'd',
version: '0.1.0',
dist: {
tarball: 'http://localhost:3001/registry/d/-/d-0.1.0.tgz'
}
}
}
}
}
],
[
'reads packument via HEAD',
Expand Down

0 comments on commit 7dfd63c

Please sign in to comment.