# insta-db

> instant file database

Latest version **0.1.0-8** (published 2023-05-01) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install insta-db
pnpm add insta-db
yarn add insta-db
bun add insta-db
```

Provides the command `insta-db`.

## 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.1.0-8 |
| Published | 2023-05-01 |
| First published | 2022-06-06 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 61.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Prokop Schield |
| Maintainers | realprokopschield |

## Links

- npm: https://www.npmjs.com/package/insta-db
- npm.io page: https://npm.io/package/insta-db

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) >=14

## Recent versions

- 0.1.0-8 (latest) — 2023-05-01
- 0.1.0-7 — 2022-07-16
- 0.1.0-6 — 2022-07-16
- 0.1.0-5 — 2022-06-28
- 0.1.0-4 — 2022-06-27
- 0.1.0-3 — 2022-06-26
- 0.1.0-2 — 2022-06-24
- 0.1.0-1 — 2022-06-06

## README

# insta-db

Instant Node.js database with built-in redundancy

### Supported platforms

This node-native module runs on 64-bit GNU/Linux and depends on git, gcc, make, node-gyp, and mmap (POSIX).

### Installation

First make sure git, gcc, and GNU Make are installed.

`yarn add insta-db`

You must also first install TypeScript, which is needed to compile this program.

`sudo yarn global add typescript` or `pnpm i -g typescript`

Make sure `typescript` is in `PATH`.

### Usage

```typescript
import { DB } from 'insta-db';

const FILE_SIZE = 65536;
const PATH_TO_STORAGE_FILE = 'test.db';
const PATH_TO_COPY_FILE = 'backup.db'; // should be on another drive, optional

const db = new DB({
	storage_file: PATH_TO_STORAGE_FILE,
	size: FILE_SIZE,
	read_only_files: [],
	storage_copies: [PATH_TO_COPY_FILE],
});
```

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