Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} catch (e) {
runtime.logger.error(
`Could not kill process! Reason: \n ${e.message}`
);
runtime.complete(1);
}
runtime.logger.info(`Successfully killed processes.`);
} else {
runtime.logger.error(
`Could not spawn process! Reason: Port ${projectConfig.server.port} already in use.`
);
runtime.complete(1);
}
}
new Server(runtime, configPath, {
dev: argv.dev,
noInteractive: !argv.interactive,
minify: argv.minify === undefined ? !argv.dev : argv.minify,
assetsDest: tempDir,
root: directory,
eager: parsedEager,
platforms: projectConfig.platforms,
bundleNames: Object.keys(projectConfig.bundles),
}).listen(projectConfig.server.host, projectConfig.server.port);
} catch (error) {
runtime.logger.error('Command failed with error:', error);
runtime.complete(1);
}
},
};