Skip to content

Commit 5be7a54

Browse files
committed
Added a note about the hook to README.md
1 parent 88153d0 commit 5be7a54

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,20 @@ new AWS.DynamoDB({
182182
### Using with serverless-offline plugin
183183
When using this plugin with serverless-offline, it is difficult to use above syntax since the code should use DynamoDB Local for development, and use DynamoDB Online after provisioning in AWS. Therefore we suggest you to use [serverless-dynamodb-client](https://github.com/99xt/serverless-dynamodb-client) plugin in your code.
184184
185+
The `serverless dynamodb start` command can be triggered automatically when using `serverless-offline` plugin.
186+
Please note that you still need to install DynamoDB Local first.
187+
188+
Add both plugins to your `serverless.yml` file:
189+
```yaml
190+
plugins:
191+
- serverless-dynamodb-local
192+
- serverless-offline
193+
```
194+
195+
Make sure that `serverless-dynamodb-local` is above `serverless-offline` so it will be loaded earlier.
196+
197+
Now your local DynamoDB database will be automatically started before running `serverless offline`.
198+
185199
## Reference Project
186200
* [serverless-react-boilerplate](https://github.com/99xt/serverless-react-boilerplate)
187201

0 commit comments

Comments
 (0)