tahoe-lafs-client

Javascript client for the Tahoe-LAFS Web API written in Typescript

Usage no npm install needed!

<script type="module">
  import tahoeLafsClient from 'https://cdn.skypack.dev/tahoe-lafs-client';
</script>

README

tahoe-lafs-client

A javascript client for the Tahoe-LAFS Web API written in Typescript.

Note: The client has been tested with Tahoe-LAFS v1.12.1

Getting Started

Requirements

Installation

npm install tahoe-lafs-client --save

Tests

Please use npm test to ensure the client is working as well as your Tahoe node.

Usage

Javascript

// Import the module
const TahoeLAFSClient = require('tahoe-lafs-client');

// Create a new client
const params = {
  hostname: 'localhost',
  port: 3456
};

const client = new TahoeLAFSClient(params);

console.log(client);
/**
 * TahoeLAFSClient {
 *  hostname: 'localhost',
 *  port: 3456,
 *  url: 'http://localhost:3456/uri'
 * }
 */

Typescript

// Import the module
import TahoeLAFSClient from 'tahoe-lafs-client';

// Create a new client
const params = {
  hostname: 'localhost',
  port: 3456
};

const client = new TahoeLAFSClient(params);

console.log(client);
/**
 * TahoeLAFSClient {
 *  hostname: 'localhost',
 *  port: 3456,
 *  url: 'http://localhost:3456/uri'
 * }
 */

Documentation

The documentation is available in the doc folder.