@fnndsc/chrisstoreapi

[![Build Status](https://travis-ci.org/FNNDSC/fnndsc.svg?branch=master)](https://travis-ci.org/FNNDSC/fnndsc)

Stats

StarsIssuesVersionUpdatedCreatedSize
@fnndsc/chrisstoreapi
3.0.05 days ago3 years agoMinified + gzip package size for @fnndsc/chrisstoreapi in KB

Readme

ChRIS Store API

Build Status

JavaScript6 client for the ChRIS Store REST API.

Installation

npm i @fnndsc/chrisstoreapi

API Documentation

If you have a ChRIS store server up and running (eg. as explained below) then you can test the API in your Javascript code.

For more information visit the API documentation

Development and testing

ChRIS Store server preconditions

These preconditions are only necessary to be able to test the client against an actual instance of a ChRIS Store server both during development and for the automated tests.

Install latest Docker and Docker Compose. Currently tested platforms

  • Docker 18.06.0+
  • Docker Compose 1.27.0+
  • Ubuntu 18.04+ and MAC OS X 10.14+

On a Linux machine make sure to add your computer user to the docker group

Fire up the full set of ChRIS store services:

Open a terminal and run the following commands in any working directory:

$> git clone https://github.com/FNNDSC/ChRIS_store.git
$> cd ChRIS_store
$> ./make.sh up

Check that all the services are up:

$> docker-compose -f docker-compose_dev.yml ps

GET request to the list of plugin metas:

Using curl:

curl http://localhost:8010/api/v1/

Using HTTPie REST API client:

http http://localhost:8010/api/v1/

Tear down the full set of ChRIS store services:

You can later remove all the backend containers and release storage volumes with:

$ cd ChRIS_store
$ ./make.sh down

JavaScript package manager prerequisite

  • yarn

Open a terminal in the directory of this README file

Commands

Install dependencies

$> yarn install

Start tests in watch mode (used for developing)

$> yarn start

Start test in single run mode (used by Travis CI)

$> yarn test

Compile library to standalone bundle

$> yarn build

Generate source code documentation

$> yarn docs

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.