MCPcopy Index your code
hub / github.com/react/create-react-app / getProcessIdOnPort

Function getProcessIdOnPort

packages/react-dev-utils/getProcessForPort.js:28–32  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

26}
27
28function getProcessIdOnPort(port) {
29 return execFileSync('lsof', ['-i:' + port, '-P', '-t', '-sTCP:LISTEN'], execOptions)
30 .split('\n')[0]
31 .trim();
32}
33
34function getPackageNameInDirectory(directory) {
35 var packagePath = path.join(directory.trim(), 'package.json');

Callers 1

getProcessForPortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected