Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cmd-api-server): move Servers class to common package #260

Closed
petermetz opened this issue Aug 26, 2020 · 0 comments · Fixed by #276
Closed

refactor(cmd-api-server): move Servers class to common package #260

petermetz opened this issue Aug 26, 2020 · 0 comments · Fixed by #276
Labels

Comments

@petermetz
Copy link
Contributor

Description

As a plugin author I want to have access to the Servers utility class so that I can use it to deal with HTTP/S servers easier.
An example is when wanting to shut down an HTTP/S server with a one liner method call that returns a promise (lacking that, you have to manually promisify the shutdown call).

The class currently is at:
packages/cactus-cmd-api-server/src/main/typescript/common/servers.ts

And it should be under:
packages/cactus-common/src/main/typescript/servers.ts

Acceptance Criteria

  1. Class is moved
  2. Dependent code is updated in all packages to use the new import from the common package
  3. Ensure that the common package only exports the Servers class under the node target (index.ts) and not for the web.
petermetz added a commit to petermetz/cacti that referenced this issue Sep 5, 2020
Useful when working with HTTP servers especially for
test case authoring where there's a lot of server
creation for the purpose of allocating random ports
prior to launching an API server instance.

Fixes hyperledger-cacti#260
Fixes hyperledger-cacti#267

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to petermetz/cacti that referenced this issue Sep 17, 2020
Useful when working with HTTP servers especially for
test case authoring where there's a lot of server
creation for the purpose of allocating random ports
prior to launching an API server instance.

Fixes hyperledger-cacti#260
Fixes hyperledger-cacti#267

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this issue Sep 17, 2020
Useful when working with HTTP servers especially for
test case authoring where there's a lot of server
creation for the purpose of allocating random ports
prior to launching an API server instance.

Fixes #260
Fixes #267

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant