A simple utility to free a port prior to use, optionally prompting before stopping the process.
If it finds that the port is being used by Docker it will stop the container using the port rather than stopping the whole Docker process and killing all your containers with it.
Its particularly useful to add this to your npm scripts before starting a server on a specific port. This will allow you to stop the process thats preventing this one from starting without having to go and find it.
free-port <port> [options]
Don't prompt before killing the process on the requested port.
free-port 3000
free-port 3000 -s
free-port 3000 && start-server 3000