(port)
| 67 | } |
| 68 | |
| 69 | function 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 | |
| 85 | module.exports = getProcessForPort; |
no test coverage detected