An open API service indexing awesome lists of open source software.

https://github.com/radarsu/kill-process-on-port

Not responding process killer. Kill process on port you wanna use (if you accept terminal inquirer question) 🙈🙉🙊
https://github.com/radarsu/kill-process-on-port

blocking inquirer javascript javascript-library kill kill-process killer node nodejs nodejs-library port process typescript typescript-library utility-library

Last synced: 6 months ago
JSON representation

Not responding process killer. Kill process on port you wanna use (if you accept terminal inquirer question) 🙈🙉🙊

Awesome Lists containing this project

README

        


kill-process-on-port

Not responding, unresponsive process killer. Kill process on port you wanna use.


TypeScript process killer utility function that greatly speeds up development.


npm



[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/radarsu)
## Description

If you work with application that occupies some port and sometimes hangs up - you definitely should start using `kill-process-on-port`. It shows you a prompt in console, then you choose to either kill an application occupying port or not. Safe and sound!

## Installation

```sh
npm i kill-process-on-port
```

## Features

- TypeScript with documentation in comments.
- Both Windows and Linux support. Uses built-in commands: `netstat` on Windows and `fuser` on Linux.
- Prompts for confirmation before killing process (by inquirer).

## Usage
```ts
import {
killProcessOnPort,
} from 'kill-process-on-port';

(async () => {

await killProcessOnPort(3000).catch((err) => {
console.log(err);
});

})();
```