Skip to content

Add --listenOn to listen on IPs other than localhost #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down