#!/bin/bash

PORT=${1:-8000}
pid=$(lsof -i tcp:${PORT} | grep LISTEN | awk '{print $2}')
echo Found app running on pid $pid
echo $pid | xargs kill -15
echo port $PORT killed