In https://www.jovo.tech/tutorials/add-dynamodb-database
, @jan seems to say we can set things up so development (default) runs with FileDB
while production runs with DynamoDB
. It seems to imply that to support this, app.js would require
and app.use
both databases.
If I do that, following the config.prod.js
pattern shown there, then initializing DynamoDB
in non-prod execution complains that the table name hasn’t been set.
Does the javascript code need to conditionally select one or the other database so dynamodb
isn’t initialized when not being used? If so, is there a best practice for writing that conditional… and shouldn’t the tutorial spell that out?
If not, any idea what I’m doing wrong?