diff --git a/README.md b/README.md index 12dd8e0..3a40d38 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,8 @@ You can configure Majestic by adding `majestic` key to `package.json`. `--version` - Will print the version of Majestic and will exit. +`--listenOn` - Will listen on this IP/host instead of localhost. + ### Shortcut keys `alt+t` - run all tests diff --git a/server/index.ts b/server/index.ts index c23ea5b..f74aa0f 100644 --- a/server/index.ts +++ b/server/index.ts @@ -46,7 +46,8 @@ async function main() { playground: "/debug" }, async () => { - const url = `http://localhost:${port}`; + const listenOn = args.listenOn || "localhost"; + const url = `http://${listenOn}:${port}`; console.log(`⚡ Majestic v${pkg.version} is running at ${url} `); if (args.app) {