Skip to content

Commit 29be9d6

Browse files
committed
Add documentation for getProcessForPort
1 parent 85e8151 commit 29be9d6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/react-dev-utils/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@ compiler.plugin('done', function(stats) {
142142
});
143143
```
144144

145+
#### `getProcessForPort(port: number): string`
146+
147+
Finds the currently running process(es) on `port`.
148+
Returns a string containing the name and directory, e.g.,
149+
150+
```
151+
create-react-app
152+
in /Users/developer/create-react-app
153+
```
154+
155+
```js
156+
var getProcessForPort = require('react-dev-utils/getProcessForPort');
157+
158+
getProcessForPort(3000);
159+
```
160+
145161
#### `openBrowser(url: string): boolean`
146162

147163
Attempts to open the browser with a given URL.

0 commit comments

Comments
 (0)