@adonisjs/redis
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -0,1 +1,6 @@ | ||
<a name="2.0.2"></a> | ||
## [2.0.2](https://github.com/adonisjs/adonis-redis/compare/v2.0.1...v2.0.2) (2017-08-18) | ||
<a name="2.0.1"></a> | ||
@@ -2,0 +7,0 @@ ## [2.0.1](https://github.com/adonisjs/adonis-redis/compare/v2.0.0...v2.0.1) (2017-08-02) |
@@ -14,12 +14,19 @@ 'use strict' | ||
module.exports = async function (cli) { | ||
async function createConfigFile (cli) { | ||
try { | ||
await cli.copy( | ||
path.join(__dirname, './examples/redis.js'), | ||
path.join(cli.helpers.configPath(), 'redis.js') | ||
) | ||
await cli.copy(path.join(__dirname, 'examples/redis.js'), path.join(cli.helpers.configPath(), 'redis.js')) | ||
cli.command.completed('create', 'config/redis.js') | ||
} catch (error) { | ||
// ignore error when redis.js already exists | ||
} | ||
} catch (e) {} | ||
} | ||
async function createListenerFile (cli) { | ||
try { | ||
await cli.copy(path.join(__dirname, 'examples/listener.js'), path.join(cli.helpers.appRoot(), 'start/redis.js')) | ||
cli.command.completed('create', 'start/redis.js') | ||
} catch (e) {} | ||
} | ||
module.exports = async function (cli) { | ||
createConfigFile(cli) | ||
createListenerFile(cli) | ||
} |
@@ -19,3 +19,3 @@ ## Registering provider | ||
## Pub Sub | ||
In order to make use of pub/sub you can create `start/redis.js` file and subscribe to channels. | ||
In order to make use of pub/sub you can subscribe to channels inside `start/redis.js` file. | ||
@@ -32,3 +32,3 @@ ```js | ||
## Config | ||
The config file `start/redis.js` contains all the configuration. Feel free to tweak it as per your needs. | ||
The config file `config/redis.js` contains all the configuration. Feel free to tweak it as per your needs. | ||
@@ -35,0 +35,0 @@ ## Environment variables |
{ | ||
"name": "@adonisjs/redis", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "AdonisJs official redis provider to make working with redis fun and simple.", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25056
14
630