Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function printLogMessage (slug, urls, defaultPort, port) {
let portMatches = port === defaultPort;
urls = urls
.map(u => chalk.bold(chalk.cyan(u)))
.map(u => ` ${u}`)
.join('\n');
const portMsg = portMatches ? '' : chalk.red(`ERROR: Port ${defaultPort} is in use, using ${chalk.cyan(port)} instead\n`)
const msg = `Development server for ${chalk.magenta(slug)} running at:`
logger.persistent(`${portMsg}${chalk.bold(msg)}
${urls}
Enter Ctrl + C in your shell to stop the server.\n`);
}