INNER CODE UNIT · TypeScript
start
sensedeep/dynamodb-onetable · samples/typescript/src/index.ts:55
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(1000)
}
async function stop() {
process.kill(dynamodb.pid)
}
async function test() {
/*
For this sample, create the table. Normally would be created separately.
*/
await table.createTable()
/*
Create typed models. We can also access items using the table APIs. E.g. table.get('User', ...)