marathon-node-library

Node.js client library for Marathon's REST API with native Promises

Usage no npm install needed!

<script type="module">
  import marathonNodeLibrary from 'https://cdn.skypack.dev/marathon-node-library';
</script>

README

Marathon Node.js Client Library

Node.js client library lightweight for Marathon's REST API. ES6

Install

Install using npm or yarn

$ npm install marathon-node-library
$ yarn add marathon-node-library

Config

const marathonClient = require('marathon-node-library')(MARATHON_API_URL, {
  // if you have basic authentifiaction in you marathon API
  auth: {
    user: MARATHON_USER,
    pass: MARATHON_PASSWORD,
  },
  // Or Accestoken auth
  headers: {
    'Authorization': 'token=MARATHON_AUTH_TOKEN'
  }
});

API Methods

Apps

  • /v2/apps GET
marathonClient.apps.getList(query)
  • /v2/apps POST "Create App"
marathonClient.app.create(body)

Insipred on marathon-node of @elasticio

License

MIT.