Skip to content

Commit 9f22442

Browse files
committed
Add host option
1 parent 8b8f22f commit 9f22442

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,15 @@ class ServerlessDynamodbLocal {
102102
return port;
103103
}
104104

105+
get host() {
106+
const config = this.config;
107+
const host = _.get(config, "start.host", "localhost");
108+
return host;
109+
}
110+
105111
dynamodbOptions() {
106112
const dynamoOptions = {
107-
endpoint: `http://localhost:${this.port}`,
113+
endpoint: `http://${this.host}:${this.port}`,
108114
region: "localhost",
109115
accessKeyId: "MOCK_ACCESS_KEY_ID",
110116
secretAccessKey: "MOCK_SECRET_ACCESS_KEY"

0 commit comments

Comments
 (0)