Add port notification on start
This commit is contained in:
parent
75cd33beec
commit
ade465ef36
1 changed files with 11 additions and 1 deletions
|
|
@ -113,7 +113,17 @@ M.start = function(dir)
|
|||
end,
|
||||
})
|
||||
|
||||
log('live-server started', 'INFO')
|
||||
-- Extract port from args
|
||||
local port = 'unknown'
|
||||
for _, arg in ipairs(M.config.args) do
|
||||
local p = arg:match('%-%-port=(%d+)')
|
||||
if p then
|
||||
port = p
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
log(string.format('live-server started on 127.0.0.1:%s', port), 'INFO')
|
||||
job_cache[dir] = job_id
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue