lib-oa

2.5.1 • Public • Published

OpenAddresses CLI & Lib

Javascript Library and CLI for the OpenAddresses API

General Usage

Installation

JS Library

yarn add 'oa'

CLI

yarn global add 'oa'

Instantiation

Note: if the username & password is not explicitly set, OA will fallback to checking for a OA_USERNAME & OA_PASSWORD environment variable. For the url parameter, be sure to include the protocol and (if necessary) port number.

Alternatively an API token can be provided via a OA_TOKEN environment variable, or the server secret via the OA_SECRET variable.

JS Library

const OA = require('oa');

const oa = new OA({
    username: 'ingalls',
    password: 'yeaheh',
    url: 'http://example.openaddresses.io',
});

CLI

The CLI tool must be provided the URL to connect to for each subcommand. This can be accomplished by providing the URL to a local or remote OA server. Be sure to include the protocol and, for local connections, the port number.

# Connecting to a remote oa server
./cli.js --url 'https://example.openaddresses.io'
# Connecting to a local oa dev server
./cli.js --url 'http://localhost:5000'

Readme

Keywords

none

Package Sidebar

Install

npm i lib-oa

Weekly Downloads

1

Version

2.5.1

License

MIT

Unpacked Size

24.4 kB

Total Files

11

Last publish

Collaborators

  • ingalls