MCPcopy Index your code
hub / github.com/github/docs / killServer

Function killServer

script/server-for-jest.js:23–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23export function killServer() {
24 kill(PORT, 'tcp')
25 .then(() => {
26 console.log(`Killed what was on :${PORT}`)
27 })
28 .catch((error) => {
29 console.log(`Unable to kill whatever was on :${PORT}:`, error)
30 })
31}
32
33export async function isPortRunning() {
34 return await portUsed.check(PORT)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected