Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
app.listen(DEFAULT_PORT, () => {
const localIpUrl = prepareUrls({
protocol: 'http',
host: HOST,
port: DEFAULT_PORT,
});
console.log(`> Server Listening at Local: ${color.green(localIpUrl.localUrl)}`);
console.log(`> On Your Network: ${color.green(localIpUrl.lanUrl)}\n`);
});
/**
app.all('/*', (req, res, next) => {
console.log(`${color.green(req.method)} - ${req.url}`);
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Content-Type,Content-Length,Authorization,Accept,X-Requested-With');
res.header('Access-Control-Allow-Methods', 'PUT,POST,GET,DELETE,OPTIONS');
next();
});
app.listen(DEFAULT_PORT, () => {
const localIpUrl = prepareUrls({
protocol: 'http',
host: HOST,
port: DEFAULT_PORT,
});
console.log(`> Server Listening at Local: ${color.green(localIpUrl.localUrl)}`);
console.log(`> On Your Network: ${color.green(localIpUrl.lanUrl)}\n`);
});
/**
.on('--help', () => {
logs();
logs(' Examples:');
logs();
logs(` $ ${colors.green('kkt test --env=jsdom')}`);
logs(` $ ${colors.green('kkt test --env=jsdom --coverage')}`);
logs();
})
.action((env, coverage, cmd) => {
.on('--help', () => {
logs();
logs(' Examples:');
logs();
logs(` $ ${colors.green('kkt test --env=jsdom')}`);
logs(` $ ${colors.green('kkt test --env=jsdom --coverage')}`);
logs();
})
.action((env, coverage, cmd) => {
.on('--help', () => {
logs()
logs(' Examples:')
logs(' https://webpack.docschina.org/configuration/watch/#watchoptions')
logs(` May be used for ${colors.green('Electron')} or ${colors.green('Chrome-Plugin')} project development.`)
logs()
logs(' $ kkt watch')
logs()
})
.action((cmd) => {
program.on('--help', function () {
logs('\n Examples:');
logs();
logs(` $ ${colors.green('kkt')} start`);
logs(` $ ${colors.green('kkt')} build`);
logs(` $ ${colors.green('kkt')} watch`);
logs(` $ ${colors.green('kkt')} test --env=jsdom`);
logs(` $ ${colors.green('kkt')} test --env=jsdom --coverage`);
logs();
logs();
})