gancio/config.example.js

59 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-04-30 15:16:50 +02:00
/**
* GANCIO CONFIGURATION
*/
const env = process.env.NODE_ENV || 'development'
/**
* Database configuration
* `development` configuration is enabled running `yarn dev`
* while `production` with `yarn start`
* ref: http://docs.sequelizejs.com/class/lib/sequelize.js~Sequelize.html#instance-constructor-constructor
*/
const DB_CONF = {
development: {
storage: __dirname + '/db.sqlite',
dialect: 'sqlite',
},
production: {
2019-06-06 23:54:32 +02:00
username: '',
password: '',
database: 'gancio',
host: 'localhost',
dialect: 'postgres',
logging: false
},
2019-04-30 15:16:50 +02:00
}
2019-06-06 23:54:32 +02:00
const SECRET_CONF = {
// where events/users confirmation email are sent
admin: 'gancio@example.com',
2019-04-30 15:16:50 +02:00
db: DB_CONF[env],
2019-06-06 23:54:32 +02:00
// jwt salt secret (generate it randomly)
secret: '',
2019-04-30 15:16:50 +02:00
2019-06-06 23:54:32 +02:00
// smtp account to send email
2019-04-30 15:16:50 +02:00
smtp: {
2019-06-06 23:54:32 +02:00
host: process.env.SMTP_HOST || 'mail.example.com',
2019-04-30 15:16:50 +02:00
secure: true,
auth: {
2019-06-06 23:54:32 +02:00
user: process.env.SMTP_USER || 'gancio@example.com',
pass: process.env.SMTP_PASS || ''
2019-04-30 15:16:50 +02:00
}
},
2019-06-06 23:54:32 +02:00
}
/**
* Main Gancio configuration
*/
const SHARED_CONF = {
locale: 'it',
title: 'GANCIO',
description: 'A calendar for radical communities',
2019-06-08 13:18:47 +02:00
baseurl: '' || 'http://localhost:3000',
2019-06-06 23:54:32 +02:00
env
2019-04-30 15:16:50 +02:00
}
2019-06-08 13:18:47 +02:00
module.exports = { SHARED_CONF, SECRET_CONF, ...SECRET_CONF.db }