This module is for accessing the v2 civo API which is documented here
v2 of this module has made some changes to the layout of some functions so if you are upgrading you may have to make some changes
- install npm
npm install civocloud --save
this package uses native ES6 promises for all api calls.
to use civocloud-nodejs
you first need to supply the api token:
const { Civo } = require('civocloud');
const civo = new Civo({ apiToken: 'apiToken' });
a simple example of calling one of the APIs is:
const { Civo } = require('civocloud');
const civo = new Civo({ apiToken: 'apiToken' });
civo.listInstanceSizes().then((sizes) => {
console.log(sizes);
}).catch((err) => {
console.error(err);
});
The api functions are now documented on the API page
This package is not an official package from civo and has not been made by them as it is just an abstraction layer to the civo API.