Skip to content

Instantly share code, notes, and snippets.

@jeff-kilbride
Created October 17, 2017 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeff-kilbride/e00edc812bd9d807cf8e30ae65aa0d78 to your computer and use it in GitHub Desktop.
Save jeff-kilbride/e00edc812bd9d807cf8e30ae65aa0d78 to your computer and use it in GitHub Desktop.
Server level glue / confidence config
'use strict';
module.exports = {
Glue: {
server: {
cache: {
name: 'redis',
engine: 'catbox-redis',
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
database: {
'$filter': 'env',
'$default': 1,
production: 0
},
partition: process.env.REDIS_PARTITION
},
app: {
serverRootDir: __dirname,
debug: {
'$filter': 'env',
'$default': true,
production: false
}
}
},
connections: {
'$filter': 'env',
'$base': {
routes: {
files: {
relativeto: __dirname
}
}
},
'$default': [
{ port: process.env.PORT || 80 }
],
local: [
{ port: 4000 }
]
},
registrations: [
{ plugin: 'hapi-auth-cookie' },
{ plugin: 'vision' },
{ plugin: 'inert' },
{
plugin: {
register: 'good',
options: {
reporters: {
myConsole: [
{
module: 'good-squeeze',
name: 'Squeeze',
args: {
'$filter': 'env',
'$default': [{ log: '*', response: '*', request: '*', error: '*' }],
production: [{ log: '*', request: ['console'], error: '*' }]
}
},
{
module: 'good-console',
args: [{ format: 'YYYY-MM-DD/HH:mm:ss.SSS' }]
},
'stdout'
]
}
}
}
},
{ plugin: './plugins/utils' },
{ plugin: './plugins/api' },
{ plugin: './plugins/react-app' }
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment