Redis connection
This commit is contained in:
parent
5a64aefb65
commit
07a7609502
4 changed files with 36 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -14,3 +14,5 @@ yarn-error.log*
|
||||||
*.sln
|
*.sln
|
||||||
|
|
||||||
.vuepress/dist
|
.vuepress/dist
|
||||||
|
|
||||||
|
.env
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
var octokit = require('@octokit/rest')();
|
var octokit = require('@octokit/rest')();
|
||||||
|
|
||||||
|
var redis = require("redis"),
|
||||||
|
redisClient = redis.createClient(process.env.REDISCLOUD_URL);
|
||||||
|
|
||||||
octokit.activity.getEventsForOrg({
|
octokit.activity.getEventsForOrg({
|
||||||
org: 'lbryio',
|
org: 'lbryio',
|
||||||
per_page: 20,
|
per_page: 20,
|
||||||
|
@ -8,4 +13,6 @@ octokit.activity.getEventsForOrg({
|
||||||
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
|
redisClient.set('events', JSON.stringify(data), redis.print);
|
||||||
|
|
||||||
});
|
});
|
|
@ -11,10 +11,12 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/rest": "^15.4.0",
|
"@octokit/rest": "^15.4.0",
|
||||||
"cors": "^2.8.4",
|
"cors": "^2.8.4",
|
||||||
|
"dotenv": "^5.0.1",
|
||||||
"express": "^4.16.3",
|
"express": "^4.16.3",
|
||||||
"heroku-ssl-redirect": "0.0.4",
|
"heroku-ssl-redirect": "0.0.4",
|
||||||
"highlight.js": "^9.12.0",
|
"highlight.js": "^9.12.0",
|
||||||
"node-sass": "^4.8.3",
|
"node-sass": "^4.8.3",
|
||||||
|
"redis": "^2.8.0",
|
||||||
"request": "^2.85.0",
|
"request": "^2.85.0",
|
||||||
"sass-loader": "^7.0.1",
|
"sass-loader": "^7.0.1",
|
||||||
"vue": "^2.5.16",
|
"vue": "^2.5.16",
|
||||||
|
|
24
yarn.lock
24
yarn.lock
|
@ -1473,6 +1473,14 @@ dot-prop@^4.1.0, dot-prop@^4.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-obj "^1.0.0"
|
is-obj "^1.0.0"
|
||||||
|
|
||||||
|
dotenv@^5.0.1:
|
||||||
|
version "5.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
|
||||||
|
|
||||||
|
double-ended-queue@^2.1.0-0:
|
||||||
|
version "2.1.0-0"
|
||||||
|
resolved "https://registry.yarnpkg.com/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz#103d3527fd31528f40188130c841efdd78264e5c"
|
||||||
|
|
||||||
duplexer3@^0.1.4:
|
duplexer3@^0.1.4:
|
||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||||
|
@ -4565,6 +4573,22 @@ redent@^2.0.0:
|
||||||
indent-string "^3.0.0"
|
indent-string "^3.0.0"
|
||||||
strip-indent "^2.0.0"
|
strip-indent "^2.0.0"
|
||||||
|
|
||||||
|
redis-commands@^1.2.0:
|
||||||
|
version "1.3.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.3.5.tgz#4495889414f1e886261180b1442e7295602d83a2"
|
||||||
|
|
||||||
|
redis-parser@^2.6.0:
|
||||||
|
version "2.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-2.6.0.tgz#52ed09dacac108f1a631c07e9b69941e7a19504b"
|
||||||
|
|
||||||
|
redis@^2.8.0:
|
||||||
|
version "2.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/redis/-/redis-2.8.0.tgz#202288e3f58c49f6079d97af7a10e1303ae14b02"
|
||||||
|
dependencies:
|
||||||
|
double-ended-queue "^2.1.0-0"
|
||||||
|
redis-commands "^1.2.0"
|
||||||
|
redis-parser "^2.6.0"
|
||||||
|
|
||||||
reduce-css-calc@^1.2.6:
|
reduce-css-calc@^1.2.6:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
|
resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
|
||||||
|
|
Loading…
Reference in a new issue