Skip to content

USEPA/useeio.js

Repository files navigation

useeio.js

useeio.js is a JavaScript client API for the USEEIO API that runs in the browser. It is written in TypeScript and uses rollup.js with the typescript2 pluginto create a single UMD bundle; terser is then used to create a minified bundle.

Usage

useeio.js can be installed from Github directly:

$ npm install git+https://github.com/usepa/useeio.js.git

Alternatively, you can download and build it locally:

$ cd {some folder}
$ git clone https://github.com/usepa/useeio.js.git
$ cd useeio.js
$ npm install
$ npm run build

Dump API data locally

This project contains a script for downloading a JSON dump of an USEEIO-API instance:

$ node scripts\dumpjson.js --endpoint {URL} --apikey {API key}

Where {URL} is some API endpoint, like https://api.edap-cluster.com/useeio/api. You can then host the dump locally, e.g. via htpp-server:

# just install it once, globally
npm install http-server -g

# host the data folder on port 8080, allowing CORS
http-server ./data -p 8080 --cors