# backdepot

> backend storage

Latest version **0.2.1** (published 2022-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install backdepot
pnpm add backdepot
yarn add backdepot
bun add backdepot
```

## 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.2.1 |
| Published | 2022-02-19 |
| First published | 2021-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 239.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Vitalii Vasilev |
| Maintainers | vasilev.v.vitalii |

## Links

- npm: https://www.npmjs.com/package/backdepot
- Repository: https://github.com/VasilevVitalii/backdepot
- Homepage: https://github.com/VasilevVitalii/backdepot#readme
- Issues: https://github.com/VasilevVitalii/backdepot/issues
- npm.io page: https://npm.io/package/backdepot

## Dependencies (8)

- [chokidar](https://npm.io/package/chokidar.md) ^3.5.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.1.1
- [vv-common](https://npm.io/package/vv-common.md) ^0.0.6
- [vv-filestream](https://npm.io/package/vv-filestream.md) 0.1.2
- [better-sqlite3](https://npm.io/package/better-sqlite3.md) ^7.4.4
- [@types/fs-extra](https://npm.io/package/@types/fs-extra.md) ^9.0.13
- [@types/better-sqlite3](https://npm.io/package/@types/better-sqlite3.md) ^7.4.1

## Recent versions

- 0.2.1 (latest) — 2022-02-19
- 0.1.3 — 2022-02-19
- 0.1.2 — 2021-12-14
- 0.1.1 — 2021-12-14
- 0.1.0 — 2021-12-13
- 0.0.9 — 2021-11-19
- 0.0.8 — 2021-11-11
- 0.0.7 — 2021-11-09
- 0.0.6 — 2021-11-08
- 0.0.5 — 2021-11-06
- 0.0.4 — 2021-10-15
- 0.0.3 — 2021-10-01
- 0.0.1 — 2021-09-21

## README

# backdepot for backend nodejs
## Features
State storage
* Embedded
* With parallel access
* File-oriented
## Demo in folder **demo**
## License
**MIT**
## Install
```
npm i backdepot
```
## Example
```ts
import { Create as DepotCreate } from 'backdepot'
const depot = DepotCreate({
    pathMap: './map',  //OR 'MEMORY'
    pathData: undefined,
    states: [
        {name: 'person', pathData: './data/person', indexes: [
            {type: 'string', prop: 'name'},
            {type: 'number', prop: 'age'},
            {type: 'string', prop: 'gender'},
            {type: 'string', prop: 'tags'},
        ]},
        {name: 'ticket', pathData: './data/ticket', indexes: [
            {type: 'number', prop: 'id'},
            {type: 'string', prop: 'author'},
            {type: 'string', prop: 'assegnee.name'},
            {type: 'string', prop: 'history.create'},
            {type: 'string', prop: 'history.deadline'},
        ]},
    ]
})
depot.callback.onError(error => {console.warn(error)})
depot.callback.onDebug(debug => {console.log(debug)})
depot.callback.onTrace(trace => {console.log(trace)})}
depot.callback.onStateComplete(() => {
    console.log('depot ready to work')
})
depot.start()
```

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