Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (server) {
// eslint-disable-next-line no-console
console.log('Configuration changed. Restarting the server...');
await promisify(server.close).call(server);
}
const config = await loadConfig(argv);
server = await MetroApi.runServer(config, argv);
restarting = false;
}
const foundConfig = await resolveConfig(argv.config, argv.cwd);
if (foundConfig) {
await watchFile(foundConfig.filepath, restart);
} else {
await restart();
}
}),
});
}
if (server) {
// eslint-disable-next-line no-console
console.log('Configuration changed. Restarting the server...');
await promisify(server.close).call(server);
}
const config = await loadConfig(argv);
server = await MetroApi.runServer(config, argv);
restarting = false;
}
const foundConfig = await resolveConfig(argv.config, argv.cwd);
if (foundConfig) {
await watchFile(foundConfig.filepath, restart);
} else {
await restart();
}
}),
});