Merge pull request #17 from powN1/port-notification

Add port notification on start
This commit is contained in:
Barrett Ruth 2025-05-29 14:42:43 -05:00 committed by GitHub
commit e8a34bc37f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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