Skip to content

Instantly share code, notes, and snippets.

@AleixMT
Created July 26, 2024 17:56
Show Gist options
  • Save AleixMT/77f178f2d8efdc74aa2ce7580a70b4af to your computer and use it in GitHub Desktop.
Save AleixMT/77f178f2d8efdc74aa2ce7580a70b4af to your computer and use it in GitHub Desktop.
kills app on port
# If there is any application listening to port 8081 (which is the one used to deploy the app) kill it.
if lsof -ti tcp:8081 &> /dev/null; then
# if there is someone running in port 8081
lsof -ti tcp:8081 | xargs kill
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment