File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,19 @@ const BbPromise = require("bluebird");
4
4
const AWS = require ( "aws-sdk" ) ;
5
5
const dynamodbLocal = require ( "dynamodb-localhost" ) ;
6
6
const seeder = require ( "./src/seeder" ) ;
7
+ const path = require ( 'path' ) ;
7
8
8
9
class ServerlessDynamodbLocal {
9
10
constructor ( serverless , options ) {
10
11
this . serverless = serverless ;
11
12
this . service = serverless . service ;
12
13
this . serverlessLog = serverless . cli . log . bind ( serverless . cli ) ;
13
- this . options = options ;
14
+ this . config = this . service . custom && this . service . custom . dynamodb || { } ;
15
+ this . options = _ . merge ( {
16
+ localPath : path . join ( serverless . config . servicePath , '.dynamodb' )
17
+ } ,
18
+ options
19
+ ) ;
14
20
this . provider = "aws" ;
15
21
this . commands = {
16
22
dynamodb : {
@@ -191,7 +197,8 @@ class ServerlessDynamodbLocal {
191
197
startHandler ( ) {
192
198
const config = this . service . custom && this . service . custom . dynamodb || { } ;
193
199
const options = _ . merge ( {
194
- sharedDb : this . options . sharedDb || true
200
+ sharedDb : this . options . sharedDb || true ,
201
+ install_path : this . options . localPath
195
202
} ,
196
203
config && config . start ,
197
204
this . options
You can’t perform that action at this time.
0 commit comments