Arweave Test Setup

Run the latest version

The simplest way to run arlocal is to use npx, which requires having nodejs and npm installed on your machine.

npx arlocal

Local Installation

Alternatively, you can install it in your project

cd my-project
npm install -D arlocal

Run locally

npm arlocal

Configure locally

You can configure various parameters like port and persistence by using command-line arguments. Check the ArLocal documentation for more details.

Steps to Integrate with Your Project

  1. Start ArLocal before running your tests or development server.
  2. Configure your Arweave client to point to the local instance:
const Arweave = require('arweave');

const arweave = Arweave.init({
  host: 'localhost',
  port: 1984,
  protocol: 'http'
});
  1. Run your tests or interact with the local Arweave network as needed.
  • arweave
  • testing
  • web3