I'm trying to connect to my DynamoDB local using the npm lib dynamo-client. I have the local DynamoDB client install and running as per:
However trying to connect to my localhost using:
db = dynamo.createClient('localhost', dbConf.credentials)
db.request('ListTables','', (e,r) -> console.log(e))
gives the following error:
e: {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
Needed to set the port and host in the options:
dbConf =
region:
region: 'localhost'
host: 'localhost'
port: 8000
credentials:
secretAccessKey: "KEY"
accessKeyId: "ACCESSKEY"
db = dynamo.createClient(dbConf, dbConf.credentials)