Skip to content

Commit c8cc92a

Browse files
authored
Merge pull request #78 from Rocketseat/chore/add-listen-command-hostname
chore: Add UI custom hostname to listen command
2 parents cba774b + 20a7274 commit c8cc92a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/Commands/Listen.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@ class Listen extends Command {
1515
static get signature() {
1616
return `
1717
bull:listen
18-
{ --board?=@value: Run bull's dashboard }
18+
{ --board?=false : Run bull's dashboard }
19+
{ --board-hostname?=@value : Dashboard hostname }
20+
{ --board-port?=@value : Dashboard port }
1921
`
2022
}
2123

2224
static get description() {
2325
return 'Start the Bull listener'
2426
}
2527

26-
async handle(args, { board }) {
28+
async handle(args, { board = false, boardHostname = 'localhost', boardPort = 9999 }) {
2729
this.Bull.process()
2830
if (board) {
29-
const port = typeof board === 'boolean' ? 9999 : Number(board)
30-
this.Bull.ui(port)
31+
this.Bull.ui(boardPort, boardHostname)
3132
}
3233
}
3334
}

0 commit comments

Comments
 (0)