model-redis 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +20 -0
  2. package/package.json +5 -2
package/index.js CHANGED
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+ const setUpTable = require('./src/redis_model')
3
+ var client = null
4
+
5
+ function main(redis){
6
+
7
+ if(typeof redis === 'function'){
8
+ client = redis;
9
+ }else{
10
+ const {createClient} = require('redis');
11
+ client = createClient(redis || {});
12
+ client.connect();
13
+ }
14
+
15
+ // test client connection
16
+
17
+ return setUpTable(client);
18
+ }
19
+
20
+ module.exports = { client , main};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "model-redis",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Simple ORM model for redis in NodsJS",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,5 +20,8 @@
20
20
  "bugs": {
21
21
  "url": "https://github.com/wmantly/model-redis/issues"
22
22
  },
23
- "homepage": "https://github.com/wmantly/model-redis#readme"
23
+ "homepage": "https://github.com/wmantly/model-redis#readme",
24
+ "dependencies": {
25
+ "redis": "^4.0.1"
26
+ }
24
27
  }