Skip to content

Commit

Permalink
fix: By default open random port
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed May 19, 2017
1 parent fa9832c commit f58c2b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[ignore]
.*/lib/.*
.*/src/.*
.*/node_modules/config-chain.*
.*/node_modules/npmconf.*

[include]

Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class MongoDBMemoryServer {
const data = {};
let tmpDir;

data.port = await getport(this.opts.port || 27017);
data.port = await getport(this.opts.port);
data.uri = await generateConnectionString(data.port);
data.storageEngine = this.opts.storageEngine || 'ephemeralForTest';
if (this.opts.dbPath) {
Expand Down

0 comments on commit f58c2b1

Please sign in to comment.