PostgresSQL Context
Essentially hstore with JSON val and key expiration support
npm install kevin-johnson
const appStore = ;const opts = appName: 'myApp' dbUrl: processenvDATABASE_URL;const key = 'key';const val = 'val'; ;
Batch setting/getting
const items = foo: 'bar' ping: beep: 'boop' 'bop' ;store ;
Deletion
store ;
Key Expiration
store ;
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