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

Function getProcessForPort

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

Source from the content-addressed store, hash-verified

67}
68
69function getProcessForPort(port) {
70 try {
71 var processId = getProcessIdOnPort(port);
72 var directory = getDirectoryOfProcessById(processId);
73 var command = getProcessCommand(processId, directory);
74 return (
75 chalk.cyan(command) +
76 chalk.grey(' (pid ' + processId + ')\n') +
77 chalk.blue(' in ') +
78 chalk.cyan(directory)
79 );
80 } catch (e) {
81 return null;
82 }
83}
84
85module.exports = getProcessForPort;

Callers 1

choosePortFunction · 0.85

Calls 3

getProcessIdOnPortFunction · 0.85
getProcessCommandFunction · 0.85

Tested by

no test coverage detected