Created
November 14, 2017 03:38
-
-
Save thanhzusu/2b18a422755ff9806e6d38d9ac2b992d to your computer and use it in GitHub Desktop.
Terminating a process on port 8081
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Terminating a process on port 8081 | |
| Run the following command on a Mac to find the id for the process that is listening on port 8081: | |
| $ sudo lsof -i :8081 | |
| Then run the following to terminate the process: | |
| $ kill -9 <PID> | |
| On Windows you can find the process using port 8081 using Resource Monitor and stop it using Task Manager. | |
| Using a port other than 8081 | |
| You can configure the packager to use a port other than 8081 by using the port parameter: | |
| $ react-native start --port=8088 | |
| You will also need to update your applications to load the JavaScript bundle from the new port. If running on device from Xcode, you can do this by updating occurrences of 8081 to your chosen port in the node_modules/react-native/React/React.xcodeproj/project.pbxproj file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment