mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-16 18:24:04 +02:00
Merge pull request #20646 from nicolo-ribaudo/allow-any-host
Add option allow external connections to `npx gulp server`
This commit is contained in:
commit
d5653a1f7c
11
gulpfile.mjs
11
gulpfile.mjs
@ -2319,8 +2319,17 @@ gulp.task(
|
||||
}
|
||||
}
|
||||
|
||||
let host;
|
||||
const j = process.argv.indexOf("--host");
|
||||
if (j >= 0 && j + 1 < process.argv.length) {
|
||||
host = process.argv[j + 1];
|
||||
if (host === "0") {
|
||||
host = "0.0.0.0";
|
||||
}
|
||||
}
|
||||
|
||||
const { WebServer } = await import("./test/webserver.mjs");
|
||||
const server = new WebServer({ port });
|
||||
const server = new WebServer({ host, port });
|
||||
server.start();
|
||||
}
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user