Verified Commit e2050011 authored by Aral Balkan's avatar Aral Balkan
Browse files

Simplify statement (thanks, Sylvain) :)

parent 37380994
...@@ -659,7 +659,7 @@ class Site { ...@@ -659,7 +659,7 @@ class Site {
this.log(` 🔁 ${clr('❨site.js❩ Unexpected message from proxy middleware:', 'yellow')} ${message}`) this.log(` 🔁 ${clr('❨site.js❩ Unexpected message from proxy middleware:', 'yellow')} ${message}`)
} else { } else {
// Expected message. Log after improving it for clarity. // Expected message. Log after improving it for clarity.
const { proxyType, proxyProtocol } = match[1] === 'ws' ? { proxyType: 'WebSocket', proxyProtocol: 'wss' } : { proxyType: 'HTTP', proxyProtocol: 'https' } const [proxyType, proxyProtocol] = match[1] === 'ws' ? ['WebSocket', 'wss'] : ['HTTP', 'https']
const proxyPort = match[2] const proxyPort = match[2]
this.log(` 🔁 ❨site.js❩ ${clr(`${proxyType} proxy`, 'green')} set up for port ${clr(proxyPort, 'cyan')} at ${clr(`${proxyProtocol}://localhost`, 'cyan')}.`) this.log(` 🔁 ❨site.js❩ ${clr(`${proxyType} proxy`, 'green')} set up for port ${clr(proxyPort, 'cyan')} at ${clr(`${proxyProtocol}://localhost`, 'cyan')}.`)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment