# tiny-nbd-server

> NBD server

Latest version **0.0.0** (published 2023-04-03) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install tiny-nbd-server
pnpm add tiny-nbd-server
yarn add tiny-nbd-server
bun add tiny-nbd-server
```

## 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.0 |
| Published | 2023-04-03 |
| First published | 2023-04-03 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 94.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Holepunch Inc |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/tiny-nbd-server
- Repository: https://github.com/holepunchto/tiny-nbd-server
- Homepage: https://github.com/holepunchto/tiny-nbd-server#readme
- Issues: https://github.com/holepunchto/tiny-nbd-server/issues
- npm.io page: https://npm.io/package/tiny-nbd-server

## Recent versions

- 0.0.0 (latest) — 2023-04-03

## README

# tiny-nbd-server

NBD server implemention in JS focused around providing an API for implementing virtual block devices

```
npm install tiny-nbd-server
```

## Usage

```js
const NBDServer = require('nbd-server')

const server = new NBDServer({
  blockSize: 1024, // 1KB
  size: 16 * 1024 * 1024 * 1024, // 16GB block size
  async read (blockIndex) {
    // called when someone wants to read a block, you should return it
    // if no block exists for this index, return null
  },
  async write (blockIndex, block) {
    // called when someone wants to write a block, you should store it
  },
  async del (blockIndex) {
    // called when someone wants to delete a block
  }
})

server.listen('/tmp/nbd')
```

## Dependencies

TODO

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