# @varasto/remote-storage

> Varasto HTTP client that connects to remote storage

Latest version **5.0.0** (published 2026-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @varasto/remote-storage
pnpm add @varasto/remote-storage
yarn add @varasto/remote-storage
bun add @varasto/remote-storage
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2026-09-05 |
| First published | 2021-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.0 |
| Dependencies | 2 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rauli Laine |
| Maintainers | rauli |
| Keywords | varasto |

## Links

- npm: https://www.npmjs.com/package/@varasto/remote-storage
- Repository: https://github.com/RauliL/varasto
- Homepage: https://rauli.dev/varasto
- Issues: https://github.com/RauliL/varasto/issues
- npm.io page: https://npm.io/package/@varasto/remote-storage

## Dependencies (2)

- [got](https://npm.io/package/got.md) ^16.0.0
- [@varasto/storage](https://npm.io/package/@varasto/storage.md) ^6.0.0

## Recent versions

- 5.0.0 (latest) — 2026-09-05
- 4.0.0 — 2026-07-16
- 3.0.0 — 2023-10-05
- 2.0.0 — 2023-09-30
- 1.1.0 — 2021-10-05
- 1.0.0 — 2021-08-13

## README

# @varasto/remote-storage

[![npm][npm-image]][npm-url]

Storage implementation which retrieves and stores data to an [remote server].
Uses [got] library as it's HTTP client and works in Node.js environments.

[npm-image]: https://img.shields.io/npm/v/@varasto/storage.svg
[npm-url]: https://npmjs.org/package/@varasto/storage
[remote server]: https://www.npmjs.com/package/@varasto/server
[got]: https://www.npmjs.com/package/got

## Installation

```sh
$ npm install --save @varasto/remote-storage
```

## Usage

[![npm][npm-image]][npm-url]

The package provies an function called `createRemoteStorage` which returns an
object that is an implementation of [Storage] type and works as an Varasto HTTP
API client.

[npm-image]: https://img.shields.io/npm/v/@varasto/remote-storage.svg
[npm-url]: https://npmjs.org/package/@varasto/remote-storage
[storage]: https://www.npmjs.com/package/@varasto/storage

Basic usage of the API looks like this:

```TypeScript
import { createRemoteStorage } from '@varasto/remote-storage';

const storage = createRemoteStorage({ url: 'https://example.com/api/' });
```

The function takes an configuration object, which supports these settings:

| Property | Default value         | Description                             |
| -------- | --------------------- | --------------------------------------- |
| `url`    | `http://0.0.0.0:3000` | URL where the API can be accessed from. |
| `auth`   |                       | Optional authentication credentials.    |

The `auth` setting, when used, should be a simple object containing `username`
and `password` properties.

```TypeScript
const storage = createRemoteStorage({
  auth: {
    username: 'AzureDiamond',
    password: 'hunter2'
  }
});
```

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