Skip to content

Commit f7301bc

Browse files
authored
Merge pull request #104 from substantial/add-host-option
Add host option
2 parents ede3329 + b1b936f commit f7301bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

index.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,15 @@ class ServerlessDynamodbLocal {
107107
return port;
108108
}
109109

110+
get host() {
111+
const config = this.config;
112+
const host = _.get(config, "start.host", "localhost");
113+
return host;
114+
}
115+
110116
dynamodbOptions() {
111117
const dynamoOptions = {
112-
endpoint: `http://localhost:${this.port}`,
118+
endpoint: `http://${this.host}:${this.port}`,
113119
region: "localhost",
114120
accessKeyId: "MOCK_ACCESS_KEY_ID",
115121
secretAccessKey: "MOCK_SECRET_ACCESS_KEY"

0 commit comments

Comments
 (0)