Skip to content

Commit

Permalink
feat(deploy): Add Heroku config (#68)
Browse files Browse the repository at this point in the history
* fix(config): Fixed config for Heroku

* fix(config): Fixed config for Heroku

* fix(config): Fixed config for Heroku

* fix(config): Fixed config for Heroku

* feat(heroku): Fix port in config
  • Loading branch information
D34THWINGS authored Feb 7, 2017
1 parent 7624823 commit a72674f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
8 changes: 5 additions & 3 deletions config/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ module.exports = {
database: 'lvconnect',
},
kue: {
host: 'localhost',
port: 6379,
db: 0,
redis: {
host: 'localhost',
port: 6379,
db: 0,
},
prefix: 'lvc-kue',
config: {
shutdownTimeout: 5000,
Expand Down
9 changes: 4 additions & 5 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ module.exports = {
cache: {
name: 'redisCache',
engine: 'catbox-redis',
host: process.env.REDIS_URL,
socket: process.env.REDIS_URL,
database: 0,
partition: 'lvc-cache',
},
},
host: {
hostname: 'lvconnect.link-value.fr',
port: 8000,
hostname: 'localhost',
port: process.env.PORT || 8000,
},
mongodb: {
host: 'ds145039.mlab.com',
Expand All @@ -34,8 +34,7 @@ module.exports = {
password: '4lqc04tkc8n4oogo873im9eo4o',
},
kue: {
host: process.env.REDIS_URL,
db: 0,
redis: `${process.env.REDIS_URL}/1`,
prefix: 'lvc-kue',
},
logs: {
Expand Down
8 changes: 5 additions & 3 deletions config/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ module.exports = {
database: 'lvconnect_test',
},
kue: {
host: 'localhost',
port: 6379,
db: 0,
redis: {
host: 'localhost',
port: 6379,
db: 0,
},
prefix: 'lvc-kue',
config: {
shutdownTimeout: 5000,
Expand Down
8 changes: 2 additions & 6 deletions server/tasks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ const kue = require('kue');

const workers = require('./workers');

exports.register = (server, { host, port, db, prefix, config }, next) => {
exports.register = (server, { redis, prefix, config }, next) => {
const queue = kue.createQueue({
prefix,
redis: {
port,
host,
db,
},
redis,
});

server.on('stop', () => queue.shutdown(config.shutdownTimeout, (err) => {
Expand Down

0 comments on commit a72674f

Please sign in to comment.