dynode
v0.6.1
Published
node.js client for Amazon's DynamoDB
Downloads
17
Readme
dynode
Dynode is a node.js driver for working with Amazon's DynamoDB service.
Installation
Installing npm (node package manager)
$ curl http://npmjs.org/install.sh | sh
Installing dynode
$ [sudo] npm install dynode
Motivation
Dynode is designed to be a simple and easy way to work with Amazon's DynamoDB service. Amazon's http api is complicated and non obvious how to interact with it. This driver aims to offer a simplified more obvious way of working with DynamoDB, but without getting in your way or limiting what you can do with DynamoDB.
Usage
There are two different ways to use dynode: directly via the default dynamoDB client, or by instantiating your own client. The former is merely intended to be a convenient shared client to use throughout your application if you so choose.
Using the Default DynamoDB Client
The default client is accessible through the dynode module directly. Any method that you could call on an instance of a client is available on the default client:
var dynode = require('dynode');
dynode.auth({accessKeyId: "AWSAccessKey", secretAccessKey: "SecretAccessKey"});
dynode.createTable("NewTable", console.log);
dynode.listTables(console.log);
Instantiating your own DynamoDB Client
If you would prefer to manage your own client, pontentially with different auth params if you want:
var client = new (dynode.Client)({
accessKeyId: "AWSAccessKey", secretAccessKey: "SecretAccessKey"
});
API Documentation
- Auth
- Create Table
- List Tables
- Describe Table
- updateTable
- Put Item
- Update Item
- Get Item
- Delete Item
- Query
- Scan
- Batch Get Item
Tests
All tests are written with mocha and should be run with make:
$ make test