File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const start = function (file) {
31
31
let port = program . port ,
32
32
host = program . host || '127.0.0.1' ,
33
33
dbname = program . dbname || '-deployd' ,
34
- mongoPort = generatePort ( ) ,
34
+ mongoPort = program . mongoPort ? Number ( program . mongoPort ) : '27017' ,
35
35
env = program . environment || process . env . DPD_ENV || 'development' ,
36
36
retries = 0 ,
37
37
credentials = { } ;
@@ -42,10 +42,6 @@ const start = function (file) {
42
42
retries = env === 'development' && 5 ;
43
43
}
44
44
45
- if ( program . mongoPort ) {
46
- mongoPort = Number ( program . mongoPort ) ;
47
- }
48
-
49
45
if ( file ) {
50
46
process . chdir ( path . dirname ( file ) ) ;
51
47
}
@@ -170,14 +166,6 @@ const start = function (file) {
170
166
}
171
167
} ;
172
168
173
- /**
174
- * Port generation
175
- */
176
- function generatePort ( ) {
177
- const portRange = [ 3000 , 9000 ] ;
178
- return Math . floor ( Math . random ( ) * ( portRange [ 1 ] - portRange [ 0 ] ) ) + portRange [ 0 ] ;
179
- }
180
-
181
169
function checkForUpdates ( ) {
182
170
http . get ( 'http://registry.npmjs.org/deployd-cli' , ( err , res , body ) => {
183
171
if ( ! err ) {
You can’t perform that action at this time.
0 commit comments