0.1.6 • Published 18 days ago
rngo v0.1.6
rngo for Node.js
The official Node.js library for rngo and a bundled CLI.
Installation
To add the library to your Node.js project, run:
npm install rngo
or
yarn add rngo
Usage
Start by initializing an instance of the Rngo
class:
import { Rngo } from 'rngo';
const rngo = Rngo.init();
This expects the rngo API token to be available in the RNGO_API_TOKEN
environment variable, and will use default configuration values.
You can also pass in a configuration object:
const rngo = Rngo.init({
apiToken: env.API_TOKEN,
directory: 'rngo-data',
})
You can use the Rngo
instance to run simulations:
const simulation = await rngo.runSimulation()
and import simulation data:
await rngo.importSimulation(simulation.id)
CLI
The CLI can be used locally in a project by running:
npx rngo
or
yarn rngo
To install the CLI globaly, run:
npm install -g rngo
or
yarn global add rngo
For usage details, run:
rngo --help
Contributing
Release
To release, run:
npm version <major|minor|patch>
git push
git push --tags
Create the Github release for that tag, and run:
npm publish