# @sane/service

> A service interface, for typescript.

Latest version **1.0.2** (published 2016-07-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sane/service
pnpm add @sane/service
yarn add @sane/service
bun add @sane/service
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-07-21 |
| First published | 2016-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Blair Strang |
| Maintainers | sane |
| Keywords | promisify, fs |

## Links

- npm: https://www.npmjs.com/package/@sane/service
- Repository: https://github.com/bls/node-sane-service
- Issues: https://github.com/bls/node-sane-service/issues
- npm.io page: https://npm.io/package/@sane/service

## Dependencies (1)

- [@sane/promisify-listen](https://npm.io/package/@sane/promisify-listen.md) ^1.0.1

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2016-07-21
- 1.0.1 — 2016-07-20
- 1.0.0 — 2016-01-17

## README

# @sane/service

A service interface, for typescript.

Install
-------

```bash
npm install @sane/service --save
```

Example
-------

```javascript
import * as http from http;
import { Service, ServiceGroup } from '@sane/service';

let sg = new ServiceGroup([
    new Service(http.createServer(), { port: 31337 }),
    new Service(http.createServer(), { port: 31338 })
]);
await sg.start();
// Do stuff; both services are running now
```


Api
---

See [src/index.ts](src/index.ts). New services should implement
IService (just stop and start, no args, returning Promise<void>).

Compatibility
-------------

* Requires Node >= v4.0.0

Release
-------

1. Bump up the version number in package.json
1. Add a section for the new release in CHANGELOG.md
1. Run npm run prepublish to ensure it builds
1. Commit
1. Run npm publish
1. Create a git tag for the new release and push it

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