This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
301 additions
and
858 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,25 +1,34 @@ | ||
# serverless-dynalite | ||
|
||
A Serverless plugin to run Dynalite locally to handle DynamoDB development. Can watch for table config changes. | ||
A Serverless plugin to run Dynalite locally to handle DynamoDB development. | ||
|
||
Integrates with `serverless-offline`. Also works without `serverless-offline` by running | ||
Integrates with `serverless-offline`. | ||
|
||
``` | ||
serverless dynalite start | ||
``` | ||
## Getting Started | ||
|
||
to start dynalite with the tables specified in serverless.yml. Or: | ||
Install the node package with npm or yarn | ||
|
||
```bash | ||
npm install @nearst/serverless-dynalite --save-dev | ||
``` | ||
serverless dynalite watch | ||
``` | ||
|
||
to listen for changes to the serverless.yml file and add tables accordingly | ||
|
||
```bash | ||
yarn add -D @nearst/serverless-dynalite | ||
``` | ||
|
||
## Options: | ||
|
||
* -p `port` to specify the port (optional, defaults to 4567) | ||
* -d `dir` to create a dynalite db file instead of using the in-memory store (optional) | ||
|
||
Something missing? More documentation? All PRs welcome at https://github.com/sdd/serverless-dynalite | ||
Once the package is installed add it to the plugins section of your `serverless.yml`. The serverless offline plugin also needs to be installed | ||
|
||
```yaml | ||
plugins: | ||
- '@nearst/serverless-dynalite' | ||
- serverless-offline | ||
custom: | ||
# This is optional | ||
dynalite: | ||
region: localhost | ||
port: 8000 | ||
dir: ./ | ||
seed: | ||
- table: table-1 | ||
source: ./seed/table1.js | ||
``` |
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
Oops, something went wrong.