INNER CODE UNIT · JavaScript
start
sensedeep/dynamodb-onetable · samples/packed/src/index.js:70
async function start() {
// Start the dynamodb instance and then short wait for it to open a listening port.
dynamodb = DynamoDbLocal.spawn({port: PORT})
await delay(2000) // increase upon `ECONNREFUSED` error
}
async function stop() {
process.kill(dynamodb.pid)
}
async function test() {
if (!(await table.exists())) {
await table.createTable()
}
/*
The address, city and zip properties are packed into the single 'data' attribute.
All packed properties must be provided.
*/