Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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