Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-lxd-client

BrunnerLivio3MIT0.1.4TypeScript support: included

Client for the LXD REST-API for NodeJS

lxd, rest, api, client

readme

node-lxd-client

const { LXD } = require('node-lxd-client');
const fs = require('fs');
const path = require('path');

const lxd = new LXD({
    host: 'https://my-private-lxd-server:8443',
    cert: fs.readFileSync(path.resolve(__dirname, '../../.config/lxc/client.crt')),
    key: fs.readFileSync(path.resolve(__dirname, '../../.config/lxc/client.key')),
    password: 'mypassword'
});


lxd.authorizeCertificate()
   .then(data => lxd.image.all())
   .then(data => {
       console.log(data);
   })
   .catch(data => {
       console.error(data);
   });