@@ -22,7 +22,8 @@ const argv = minimist(process.argv.slice(2), {
2222 alias : {
2323 host : 'h' ,
2424 storage : 's' ,
25- bootstrap : 'b'
25+ bootstrap : 'b' ,
26+ 'network-port' : 'n'
2627 }
2728} )
2829
@@ -33,14 +34,15 @@ ${version}
3334
3435Usage: hyperspace [options]
3536
36- --host, -h Set unix socket name
37- --port -p Set the port (will use TCP)
38- --storage, -s Overwrite storage folder
39- --bootstrap, -b Overwrite DHT bootstrap servers
40- --memory-only Run all storage in memory
41- --no-announce Disable all network annoucnes
42- --repl Run a debug repl
43- --no-migrate Disable the Hyperdrive Daemon migration
37+ --host, -h Set unix socket name
38+ --port -p Set the port (will use TCP)
39+ --storage, -s Overwrite storage folder
40+ --bootstrap, -b Overwrite DHT bootstrap servers
41+ --network-port, -n Set the network port to use
42+ --memory-only Run all storage in memory
43+ --no-announce Disable all network annoucnes
44+ --repl Run a debug repl
45+ --no-migrate Disable the Hyperdrive Daemon migration
4446`
4547
4648if ( argv . help ) {
@@ -73,7 +75,7 @@ async function main () {
7375 host : argv . host ,
7476 port : argv . port ,
7577 storage,
76- network : argv . bootstrap ? { bootstrap : [ ] . concat ( argv . bootstrap ) } : null ,
78+ network : { bootstrap : argv . bootstrap ? [ ] . concat ( argv . bootstrap ) : undefined , preferredPort : argv . n || undefined , ephemeral : true } ,
7779 noAnnounce : ! argv . announce ,
7880 noMigrate : ! argv . migrate
7981 } )
0 commit comments