-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from ByteCommander/master
Update broken download URL (move to https), add installer configuration method
- Loading branch information
Showing
4 changed files
with
81 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
# dynamodb-local | ||
|
||
A wrapper for AWS DynamoDB Local, intended for use in testcases. Will automatically download the files needed to run DynamoDb Local. | ||
A wrapper for AWS DynamoDB Local, intended for use in testcases. | ||
Will automatically download the files needed to run DynamoDb Local. | ||
|
||
You can optionally override the download URL from where it fetches the installation archive | ||
as well as the target directory to which it will install the binaries (default is your system's temp folder). | ||
|
||
|
||
# Usage | ||
|
||
Install the module as development dependency by running | ||
|
||
`npm install dynamodb-local --save-dev` | ||
|
||
Then in node: | ||
Then in node, write your test script like this: | ||
|
||
```javascript | ||
var DynamoDbLocal = require('dynamodb-local'); | ||
var dynamoLocalPort = 8000; | ||
|
||
DynamoDbLocal.launch(dynamoLocalPort, null, ['-sharedDb']); //if you want to share with Javascript Shell | ||
//Do your tests | ||
DynamoDbLocal.stop(8000); | ||
DynamoDbLocal.launch(dynamoLocalPort, null, ['-sharedDb']) //if you want to share with Javascript Shell | ||
.then(function () { | ||
|
||
// do your tests | ||
|
||
DynamoDbLocal.stop(dynamoLocalPort); | ||
}); | ||
``` | ||
|
||
See [AWS DynamoDB Docs](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html) for more info on how to interact with DynamoDB Local. | ||
Another example which also shows how to override the installer configuration can be found in | ||
[examples/simple.js](examples/simple.js). | ||
|
||
See [AWS DynamoDB Docs](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html) | ||
for more info on how to interact with DynamoDB Local. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters