# easy-stop

> A hook to handle server (such as express) start/stop management

Latest version **0.0.5** (published 2016-11-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install easy-stop
pnpm add easy-stop
yarn add easy-stop
bun add easy-stop
```

Provides the command `easy-stop`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2016-11-25 |
| First published | 2016-11-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zombieJ |
| Maintainers | zombiej |

## Links

- npm: https://www.npmjs.com/package/easy-stop
- npm.io page: https://npm.io/package/easy-stop

## Dependencies (1)

- [ps-node](https://npm.io/package/ps-node.md) ^0.1.4

## Recent versions

- 0.0.5 (latest) — 2016-11-25
- 0.0.4 — 2016-11-25
- 0.0.3 — 2016-11-25
- 0.0.2 — 2016-11-25
- 0.0.1 — 2016-11-25

## README

# easy-stop

`easy-stop` is a quick util of control node server start / stop.
It can helps you start singleton web server by one folder.

### Start Server
```javascript
const easyStop = require('easy-stop');
easyStop.start().then(function () {
	// Start your server like express...
});
```
`start` will check current running instance.
Return `Promise` - `onSuccess` if no instance is running.

### Stop Server
#### by code
```javascript
const easyStop = require('easy-stop');
easyStop.stop();
```
`stop` will close the running instance.

#### by cli
```
easy-stop stop
```

### Arguments
start(pidDirPath = `current folder`, pidFileName = 'process.pid')

stop(pidDirPath = `current folder`, pidFileName = 'process.pid')

restart(pidDirPath = `current folder`, pidFileName = 'process.pid')

---
_Source: https://npm.io/package/easy-stop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
