async function start(options = {}) {
	// @todo remove this hack once registry.js is instantiable
	setCwd(options.cwd);

	// TODO: We seem to mutate our config object somewhere
	const cloned = deepCloneJSON(options);

	/** @type {string[]} */
	const configWatchFiles = [];

	// Reload server on config changes
	let instance = await bootServer(cloned, configWatchFiles);

	// Get the actual port we used and use that from here on
	// to prevent us from picking another port on restart.
	options.port = await instance.resolvePort;

	if (!supportsSearchParams) {
		// eslint-disable-next-line no-console
		console.log(kl.yellow(`WMR: Automatic config reloading is not supported on Node <= 12.18.4`));
	} else {
		const logWatcher = debug('wmr:watcher');
		const watcher = watch(configWatchFiles, {
			cwd: cloned.cwd,
			disableGlobbing: true
		});
		watcher.on('ready', () => logWatcher(' watching for config changes'));
		watcher.on('change', async () => {
			await instance.close();

			// eslint-disable-next-line no-console
			console.log(kl.yellow(`WMR: `) + kl.green(`config or .env file changed, restarting server...\n`));

			// Fire up new instance
			const cloned = deepCloneJSON(options);
			const configWatchFiles = [];
			instance = await bootServer(cloned, configWatchFiles);
			watcher.add(configWatchFiles);
			logWatcher('Server restarted');
		});
	}
}
@param {Parameters<typeof server>[0] & OtherOptions} options