node-lxd-client
v0.1.4
Published
Client for the LXD REST-API for NodeJS
Downloads
92
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);
});