INNER CODE UNIT · JavaScript
start
sensedeep/dynamodb-onetable · samples/overview/src/index.js:56
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() {
// Stop the local test dynamodb instance
process.kill(dynamodb.pid)
}
async function test() {
/*
For this sample, create the table. Normally would be created separately.
*/
await table.createTable()
/*