data-hopper
About
It's not uncommon on a project to have multiple datastores. This project makes it easy to store all your datastore connections in one easy accessible place. A number of drivers are builtin by default to support the most popular datastores.
Install
npm install data-hopper
Drivers
- Elasticsearch
- Mongodb
- MySql
- Postgres
- Redis
- Sqlite
Example
'use strict'; const DataHopper = ; const hopper = ; /** * Name connection and pass in the config */hopper; // Get the connection off the hopperconst kittens = hopper; kittensschema; console;
Adding drivers is quite trivial, below is an example with the
npm module nedb
'use strict'; const Nedb = ;const DataHopper = ; const hopper = ; hopper; hopper;