pkgcloud
Version:
An infrastructure-as-a-service agnostic cloud library for node.js
35 lines (32 loc) • 666 B
JavaScript
var pkgcloud = require('../../lib/pkgcloud');
var client = pkgcloud.database.createClient({
provider: 'redistogo',
username: "bob",
password: "1234"
});
//
// Create a redis
//
client.create({
plan: "nano",
}, function (err, result) {
//
// Log the result
//
console.log(err, result);
//
// Get the same redis we just created
//
client.get(result.id, function(err, result) {
//
// Show the details of the database we just created
//
console.log(err, result);
client.remove(result.id, function(err, result) {
//
// Ensure it was removed correctly.
//
console.log(err, result);
});
});
});