scalingo

Wrapper for the Scalingo API

Usage no npm install needed!

<script type="module">
  import scalingo from 'https://cdn.skypack.dev/scalingo';
</script>

README

Scalingo.js

Build Status Documentation

The Scalingo.js library provides convenient access to the Scalingo API. A documentation is available online

Note: 0.5.0 has a few internal changes (dependencies bumps, switch to esbuild) that may result in breakages.

Usage

The package needs to be configured with your a token which are available in your Scalingo dashboard.

const scalingo = require('scalingo')

scalingo.clientFromToken("tk-us-...").then(function(client) {
  return client.Users.self()
}).then(function(user) {
  console.log(user)
})

Or using ES modules, this looks more like:

import Scalingo from 'scalingo'

let client = await Scalingo.clientFromToken("tk-us-...")
let user = await client.Users.self()
console.log(user)

Examples

A bunch of examples are available in the examples folder to show how to use scalingo.js library. In order to execute them, you need to define the environment variable SCALINGO_TOKEN. The token can be created in Scalingo dashboard. Then modify the example so that the application name and the possible IDs match one of your application. Eventually execute the example with:

export SCALINGO_TOKEN="tk-us-...."
node examples/Addons/add_addon.js

Development

Install

yarn install

Run tests

yarn test

Release a new version

# If it's a patch (see https://docs.npmjs.com/cli/version.html)
npm version patch
git push --tags
git push origin master