Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 838 Bytes

node-mktmpio.md

File metadata and controls

37 lines (31 loc) · 838 Bytes
title
node-mktmpio

#node-mktmpio

A simple Node.js module that includes a basic version of our CLI as an example.

GitHub
mktmpio/node-mktmpio
npm
mktmpio
var mktmpio = require('mktmpio');

mktmpio.create('redis', function(err, res) {
  if (err || res.error) {
    console.error('error creating instance:', err || res.error);
    return process.exit(1);
  }

  // Do stuff here:
  // res.host
  // res.port
  // res.password

  mktmpio.destroy(res.id, function(err, res) {
    if (err || res.error) {
      console.error('error terminating service:', err || res.error);
    } else {
      console.log('instance %s terminated', instance.id);
    }
  });
});