Skip to content

Instantly share code, notes, and snippets.

@DoubleCouponDay
Created May 14, 2019 01:10
Show Gist options
  • Select an option

  • Save DoubleCouponDay/70bfe51ec13c9dc6440383e92b213004 to your computer and use it in GitHub Desktop.

Select an option

Save DoubleCouponDay/70bfe51ec13c9dc6440383e92b213004 to your computer and use it in GitHub Desktop.
start aspnet server in node
import {exec, execFile, spawn, ChildProcess} from 'child_process'
import { tick } from '@angular/core/testing';
export class ApiTestServer
{
private serverprocess : ChildProcess
constructor()
{
this.serverprocess = execFile("C:\\Program Files\\IIS Express\\iisexpress.exe", [
"/path:C:\\Users\\sjsui\\Desktop\\git_workshop\\MoonMachineProprietary\\mm-aspnet\\MoonMachine\\MoonMachine.Web",
"/clr:v4.0",
"/port:59306"]) //works with a non automated tests port
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 6000)
}
public kill = () => {
this.serverprocess.kill()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment