okta/okta-oidc-tck

Clean-up code that kills iisexpress server on windows

Opened this issue · 0 comments

Clean up this code in index.js -

async function killProcessAtPort(port) {
  // For aspnet webforms samples, we use iisexpress that is started as system process
  // Using port to kill it doesn't work. Hence killing the process through name
  const iisexpress = await find('name', 'iisexpress.exe');

   if (iisexpress.length) {
    console.log('%s is running', iisexpress[0].name);
    execSync(`TASKKILL /F /IM ${iisexpress[0].name}`);

We need a better way to find out which iisexpress server is running the current login server, so that we don't kill all iisexpress servers.