Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const server = app.listen(PORT, 'localhost', serverError => {
if (serverError) {
return console.error(serverError);
}
if (argv['start-hot']) {
tscWatch.on('first_success', () => {
console.log('typescript watcher ready, start electron...');
electronProcess = createHotElectronProcess();
});
tscWatch.on('subsequent_success', () => {
console.log('restarting electron...');
treeKill(electronProcess.pid, 'SIGKILL', createHotElectronProcess);
});
tscWatch.on('compile_errors', () => {
console.log('compile main error!!!!!!!!!');
});
tscWatch.start('-p', 'app');
}
if (serverError) {
return console.error(serverError);
}
if (argv['start-hot']) {
tscWatch.on('first_success', () => {
console.log('typescript watcher ready, start electron...');
electronProcess = createHotElectronProcess();
});
tscWatch.on('subsequent_success', () => {
console.log('restarting electron...');
treeKill(electronProcess.pid, 'SIGKILL', createHotElectronProcess);
});
tscWatch.on('compile_errors', () => {
console.log('compile main error!!!!!!!!!');
});
tscWatch.start('-p', 'app');
}
console.log(`Listening at http://localhost:${PORT}`);
});
const server = app.listen(PORT, 'localhost', serverError => {
if (serverError) {
return console.error(serverError);
}
if (argv['start-hot']) {
tscWatch.on('first_success', () => {
console.log('typescript watcher ready, start electron...');
electronProcess = createHotElectronProcess();
});
tscWatch.on('subsequent_success', () => {
console.log('restarting electron...');
treeKill(electronProcess.pid, 'SIGKILL', createHotElectronProcess);
});
tscWatch.on('compile_errors', () => {
console.log('compile main error!!!!!!!!!');
});
tscWatch.start('-p', 'app');
}
console.log(`Listening at http://localhost:${PORT}`);
});