@@ -11,7 +11,11 @@ class ServerlessDynamodbLocal {
11
11
this . service = serverless . service ;
12
12
this . serverlessLog = serverless . cli . log . bind ( serverless . cli ) ;
13
13
this . config = this . service . custom && this . service . custom . dynamodb || { } ;
14
- this . options = options ;
14
+ this . options = _ . merge ( {
15
+ localPath : path . join ( serverless . config . servicePath , '.dynamodb' )
16
+ } ,
17
+ options
18
+ ) ;
15
19
this . provider = "aws" ;
16
20
this . commands = {
17
21
dynamodb : {
@@ -124,7 +128,7 @@ class ServerlessDynamodbLocal {
124
128
125
129
if ( options && options . online ) {
126
130
this . serverlessLog ( "Connecting to online tables..." ) ;
127
- if ( ! options . region ) {
131
+ if ( ! options . region ) {
128
132
throw new Error ( "please specify the region" ) ;
129
133
}
130
134
dynamoOptions = {
@@ -152,7 +156,7 @@ class ServerlessDynamodbLocal {
152
156
}
153
157
154
158
seedHandler ( ) {
155
- const options = this . options ;
159
+ const options = this . options ;
156
160
const dynamodb = this . dynamodbOptions ( options ) ;
157
161
158
162
return BbPromise . each ( this . seedSources , ( source ) => {
@@ -179,7 +183,8 @@ class ServerlessDynamodbLocal {
179
183
startHandler ( ) {
180
184
const config = this . config ;
181
185
const options = _ . merge ( {
182
- sharedDb : this . options . sharedDb || true
186
+ sharedDb : this . options . sharedDb || true ,
187
+ install_path : this . options . localPath
183
188
} ,
184
189
config && config . start ,
185
190
this . options
0 commit comments