import { readFileSync } from 'fs';
import { execSync } from 'child_process';

const settings = JSON.parse(readFileSync('../../.vscode/settings.json', 'utf8'));
const portSuffix = settings['fast.port.suffix'];
const port = `543${portSuffix}`;

// --no-hmr due to https://github.com/angular/angular/issues/59058"
execSync(`npx ng serve --ssl --host 127.0.0.1 --port ${port} --no-hmr`,
  { stdio: 'inherit' }
);
