Skip to content

Commit

Permalink
Updating README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AshanFernando committed Jun 12, 2016
1 parent 203504f commit 03c227d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ This will create a template json inside configured directory. Open the file and

References
* Defining table schema (Dynamodb SDK): http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#createTable-property
* Defining data (Dynamodb Document Client SDK): http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#put-property
* Defining seeds (Dynamodb Document Client SDK): http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#put-property

To create table & run the seeds in your project root, run:
`sls dynamodb table -c`

If you need to prefix_<your-table-name>_suffix, you can configure the values accordingly. This is usefull when you have multiple stages which needs multiple database tables

Optionally if you want to create the tables and run the seeds on dynamodb start dynamodb local with -c argument or add the "create": true inside s-project.json as shown below
Optionally if you want to create the tables and run the seeds on dynamodb starts, use the argument -c or add the "create": true inside s-project.json as shown below

```json
"custom": {
Expand Down Expand Up @@ -129,10 +129,7 @@ Note: Default port: 8000 and if you change the port, change it accordingly in us

## Coming up

* Allow you to setup dynamodb tables creation scripts, innside your project and enables to execute them locally as well as remotely with a simple set of commands
* Similar to dynamodb table creation scripts, it also allows to setup your dynamodb data seeds for both local and remote
* Provides the ability to setup your local development environment with the support of ['serverless-offline'](https://github.com/dherault/serverless-offline) Plugin
* A fantastic and welcoming community!
* Allow to create tables & run seeds remotely with a simple set of commands.

## Links

Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ module.exports = function (S) { // Always pass in the ServerlessPlugin Class
return new BbPromise(function (resolve, reject) {
if (options.create) {
dynamodb.start(options).then(function () {
console.log(""); // seperator
self._tables(evt).then(resolve, reject);
});
} else {
Expand Down

0 comments on commit 03c227d

Please sign in to comment.