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");
44const AWS = require ( "aws-sdk" ) ;
55const dynamodbLocal = require ( "dynamodb-localhost" ) ;
66const seeder = require ( "./src/seeder" ) ;
7+ const path = require ( 'path' ) ;
78
89class ServerlessDynamodbLocal {
910 constructor ( serverless , options ) {
1011 this . serverless = serverless ;
1112 this . service = serverless . service ;
1213 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+ ) ;
1420 this . provider = "aws" ;
1521 this . commands = {
1622 dynamodb : {
@@ -191,7 +197,8 @@ class ServerlessDynamodbLocal {
191197 startHandler ( ) {
192198 const config = this . service . custom && this . service . custom . dynamodb || { } ;
193199 const options = _ . merge ( {
194- sharedDb : this . options . sharedDb || true
200+ sharedDb : this . options . sharedDb || true ,
201+ install_path : this . options . localPath
195202 } ,
196203 config && config . start ,
197204 this . options
You can’t perform that action at this time.
0 commit comments