Sign In

cloudelements-dbtool

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudelements-dbtool

A simple command-line utility to perform some simple database tasks.

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
5
25%
Maintainers
1
Weekly downloads
 
Created
Source

Cloud Elements DBTool

This is the Cloud Elements DB tool, which is used to manage cloud-elements data directly.

Install (or update) it globally:

$ npm install -g cloudelements-dbtool
$ npm update -g cloudelements-dbtool

You may also need to set some environment variables: (you could put these in your ~/.bash_profile or other startup script)

$ export DBTOOL_DB_URL=postgres://username:password@localhost:5432/elements

Once these are sorted, you can use the dbtool from the command line:

$ dbtool <command> [parameters]

For example,

$ dbtool delete-user my.email@somewhere.com

Or, you can use it in your javascript code:

var Dbtool = require('dbtool').Dbtool,
    dbUrl = 'postgres://username:password@localhost:5432/elements',
    dbtool = new Dbtool(dbUrl),
    email = 'my.email@somewhere.com';

dbtool.deleteUser(email, function(err){
  if (err != null) {
    say("err: ", err);
  } else {
    say("Delete " + email + " complete");
  }
});

FAQs

Package last updated on 22 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts