Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save pablospaniard/b5f527fd3dfe27b59ed09fbb892ab981 to your computer and use it in GitHub Desktop.

Select an option

Save pablospaniard/b5f527fd3dfe27b59ed09fbb892ab981 to your computer and use it in GitHub Desktop.
Terminating a process on port 8081
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