NIXStats.js is CLI and JavaScript Wrapper for NIXStats
Install it with npm install -g nixstats
.
Go to NIXStats and generate your own API token.
Run nixstats config <your_token_goes_here>
Run nixstats now
to see current servers situation.
Run nixstats --help
for full CLI options.
Install it with npm install nixstats -save
.
var ns = require('nixstats');
var nsClient = new ns.NIXStatsClient('<<your_token_goes_here>');
nsClient.server.list().then((result) => {
for(var server of result.servers) {
//...
}
});
- For full list of
NIXStatsClient
functions see index.js; - All functions are returned as Promises;
- The result of each Promise is exactly as shown in the official documentation;
- [CLI] output more useful information;
- [CLI] more operations, history, details, etc;
- [Wrapper] enable the user to choose between Promises or Callback;