From df6c9220e63413cfd320919ea086db85f29038bb Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Mon, 1 Jun 2020 15:17:20 -0700 Subject: [PATCH] Choose a random port instead of always using 3000 by default So that it is easy to have multiple instances of mbview running at the same time without having to set the port manually --- cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.js b/cli.js index c05d2e6..71e3077 100755 --- a/cli.js +++ b/cli.js @@ -40,7 +40,7 @@ const MBView = require('./mbview'); const params = { center: argv.center || [-122.42, 37.75], mbtiles: mbtiles, - port: argv.port || 3000, + port: argv.port || 3000 + Math.floor(Math.random() * 50000), zoom: 12, quiet: argv.q || argv.quiet, basemap: argv.basemap,