ucb-rit / slurm-banking-dummy-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dummy Accounting API

This dummy API is for testing the Slurm banking plugin. It provides deterministic outputs based on inputs. For example, the initial allocation and usage for an account is based on the account name.

Spec

The API spec is documented using the OpenAPI Specification in spec/openapi.json. HTML documentation can be built with yarn spec (after installing dependencies).

Usage

Requirements

Setup

yarn # Install node dependencies, such as express server, etc.

Running

yarn start

API server runs on port 8080 by default. You can interact with it like:

$ curl 'localhost:8080/api/accounts?username=nicolaschan'
[{"name":"night","usage":34,"allocation":189},{"name":"dew","usage":86,"allocation":192}]

About


Languages

Language:JavaScript 100.0%