From 665939a883e51751eb67d76af67b002875e7c8e2 Mon Sep 17 00:00:00 2001 From: lesion Date: Wed, 26 Jun 2019 14:49:19 +0200 Subject: [PATCH] cleaning --- .gitignore | 5 ++-- config.example.js | 70 ----------------------------------------------- 2 files changed, 3 insertions(+), 72 deletions(-) delete mode 100644 config.example.js diff --git a/.gitignore b/.gitignore index 1448995f..98797ccf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Created by .ignore support plugin (hsz.mobi) -### Gancio production configuration -/config.js + +### Gancio dev configuration +config/development.json ### Node template # Logs diff --git a/config.example.js b/config.example.js deleted file mode 100644 index 7d71958e..00000000 --- a/config.example.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * -[ GANCIO CONFIGURATION ]- - * - * search and replace 'CHANGE ME' - * - * -[ 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 path = require('path') - -const DB_CONF = { - development: { - storage: path.join(__dirname, 'db.sqlite'), - dialect: 'sqlite' - }, - production: { - username: 'CHANGE ME', - password: 'CHANGE ME', - database: 'gancio', - host: 'localhost', - dialect: 'postgres', - logging: false - } -} - -const env = process.env.NODE_ENV || 'development' -const isDev = env === 'development' -/** - * -[ Main configuration ]- - * - */ -const config = { - server: { - port: '3000', - host: 'localhost', // use 0.0.0.0 to bind to all interface - - // uncomment to use unix socket to serve gancio - // path: '/tmp/gancio_socket', - }, - - locale: 'it', - title: isDev ? 'GANCIO' : 'CHANGE ME', - description: isDev ? 'A shared agenda for radical communities' : 'CHANGE ME', - baseurl: isDev ? 'http://localhost:3000' : 'https://CHANGE_ME', - - upload_path: isDev ? '/tmp/gancio_upload' : '/var/gancio/upload/', - - // where events/users confirmation email are sent - admin: 'CHANGE ME', - - // jwt salt secret, generate it randomly with - // < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo; - secret: isDev ? 'notreallyrandom' : 'CHANGE ME', - - // smtp account to send email - smtp: { - host: 'CHANGE ME', // mail.example.com - auth: { - user: 'CHANGE ME', - pass: 'CHANGE ME' - }, - secure: true - }, - db: DB_CONF[env] -} - -module.exports = { ...config, ...config.db }