Dionne Davenport
Essentially hstore with JSON val
$ npm install dionne-davenport --save
Basic setting/getting
const Dionne = const opts = appName: 'myApp' url: processenvDATABASE_URLconst store = await await storeconst result = await storeconsole // 'if'
Batch setting/getting
const items = foo: 'bar' ping: beep: 'boop' 'bop' await storeconst result = await storeconsole/*{ foo: 'bar', ping: { beep: [ 'boop', 'bop' ] }}*/
Deletion
let itemawait storeitem = await storeconsole // foo await storeitem = await storeconsole // undefined
Tests
Create your test PostgresSQL database and user and create a test.env file for environment constiables
$ createuser myApp
$ createdb myApp
$ echo "DATABASE_URL=postgres://myApp:Ffoodk@localhost:5432/myApp" >> test/test.env
$ echo "NODE_ENV=test" >> test/test.env
$ echo "APP_NAME=appName" >> test/test.env
$ npm test