# use-max-cpu

> Use all available CPU's

Latest version **2.0.0** (published 2019-12-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install use-max-cpu
pnpm add use-max-cpu
yarn add use-max-cpu
bun add use-max-cpu
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-12-20 |
| First published | 2019-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Boris Joskic |
| Maintainers | brsjsk |
| Keywords | cpu, node, js, cluster |

## Links

- npm: https://www.npmjs.com/package/use-max-cpu
- Repository: https://github.com/BrsJsk/use-max-cpu
- Issues: https://github.com/BrsJsk/use-max-cpu/issues
- npm.io page: https://npm.io/package/use-max-cpu

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-12-20
- 1.0.1 — 2019-05-08
- 1.0.0 — 2019-05-07

## README

# use-max-cpu [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]

```
A single instance of Node.js runs in a single thread. To take advantage of multi-core systems, the user will sometimes want to launch a cluster of Node.js processes to handle the load.
```

## Installation

```sh
$ npm install --save use-max-cpu
```

## Usage

```js
const {startServer} = require('use-max-cpu');
const http = require('http');

startServer(() => {
    console.log('Worker started..')
    http.createServer((req, res) => {
        res.writeHead(200);
        res.end('hello world\n');
      }).listen(8000);
})
```
## License

MIT © [Boris Joskic](https://www.mallot.info/)


[npm-image]: https://badge.fury.io/js/use-max-cpu.svg
[npm-url]: https://npmjs.org/package/use-max-cpu
[travis-image]: https://travis-ci.com/BrsJsk/use-max-cpu.svg?branch=master
[travis-url]: https://travis-ci.com/BrsJsk/use-max-cpu
[daviddm-image]: https://david-dm.org/BrsJsk/use-max-cpu.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/BrsJsk/use-max-cpu
[coveralls-image]: https://coveralls.io/repos/BrsJsk/use-max-cpu/badge.svg
[coveralls-url]: https://coveralls.io/r/BrsJsk/use-max-cpu

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