-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Detect docker? #9
Comments
Looks like it can't detect docker. Changing the script to check port |
This module uses port |
This is a bug with the Changed the test. diff --git a/test.js b/test.js
index 9e48c61..11abc86 100644
--- a/test.js
+++ b/test.js
@@ -17,7 +17,7 @@ test('port can be bound when promise resolves', async t => {
});
test('preferred port', async t => {
- const desiredPort = 8080;
+ const desiredPort = 27017;
const port = await m(desiredPort);
t.is(port, desiredPort);
|
If it's a bug, yes. Note that it's not a package, but a core module. |
As per nodejs/node#14034 (comment) maybe use |
@OmgImAlexis as of v3.2.0 (9782a34), you can pass the host address as an option. The defaults are provided by Node which, IMO, should be kept that way. |
@acostalima maybe a warning in the README needs to be added then since I would expect this package to check all ports not just those bound to localhost. |
@sindresorhus what do you think? |
I don’t think we should change the defaults, but a note in the readme makes sense. |
@OmgImAlexis would you like to open a PR? |
It now checks all local hosts by default: https://github.com/sindresorhus/get-port/releases/tag/v6.0.0 |
This library either can't detect docker containers using ports or can't detect mongodb.
Ref: CImrie/mongomem#2 (comment)
The text was updated successfully, but these errors were encountered: