diff --git a/.gitignore b/.gitignore index 6f577b24..21a6d8fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ -node_modules -.idea -/devConfig/sequelizeCliConfig.js -/devConfig/testingConfig.js +node_modules/ +.idea/ +config/lbryConfig.js +config/loggerConfig.js +config/mysqlConfig.js +config/siteConfig.js +config/slackConfig.js +devConfig/sequelizeCliConfig.js +devConfig/testingConfig.js diff --git a/config/lbryConfig.js b/config/lbryConfig.js.example similarity index 100% rename from config/lbryConfig.js rename to config/lbryConfig.js.example diff --git a/config/loggerConfig.js.example b/config/loggerConfig.js.example new file mode 100644 index 00000000..18c53a95 --- /dev/null +++ b/config/loggerConfig.js.example @@ -0,0 +1,5 @@ +const loggerConfig = { + logLevel: 'debug', // options: silly, debug, verbose, info +}; + +module.exports = loggerConfig; diff --git a/config/mysqlConfig.js b/config/mysqlConfig.js index ee29c68f..155c038f 100644 --- a/config/mysqlConfig.js +++ b/config/mysqlConfig.js @@ -2,15 +2,6 @@ function MysqlConfig () { this.database = 'default'; this.username = 'default'; this.password = 'default'; - this.configure = (config) => { - if (!config) { - return console.log('No MySQL config received.'); - } - const {database, username, password} = config; - this.database = database; - this.username = username; - this.password = password; - }; }; module.exports = new MysqlConfig(); diff --git a/config/mysqlConfig.js.example b/config/mysqlConfig.js.example new file mode 100644 index 00000000..155c038f --- /dev/null +++ b/config/mysqlConfig.js.example @@ -0,0 +1,7 @@ +function MysqlConfig () { + this.database = 'default'; + this.username = 'default'; + this.password = 'default'; +}; + +module.exports = new MysqlConfig(); diff --git a/config/siteConfig.js b/config/siteConfig.js index 22732547..a0e91b59 100644 --- a/config/siteConfig.js +++ b/config/siteConfig.js @@ -26,17 +26,6 @@ function SiteConfig () { thumbnailChannelId : 'default', uploadDirectory : '/home/lbry/Uploads', }; - this.configure = (config) => { - if (!config) { - return console.log('No site config received.'); - } - const { analytics, assetDefaults, auth, details, publishing } = config; - this.analytics = analytics; - this.assetDefaults = assetDefaults; - this.auth = auth; - this.details = details; - this.publishing = publishing; - }; }; module.exports = new SiteConfig(); diff --git a/config/siteConfig.js.example b/config/siteConfig.js.example new file mode 100644 index 00000000..a0e91b59 --- /dev/null +++ b/config/siteConfig.js.example @@ -0,0 +1,31 @@ +function SiteConfig () { + this.analytics = { + googleId: 'default', + }; + this.assetDefaults = { + description: 'An asset published on Spee.ch', + thumbnail : 'https://spee.ch/assets/img/video_thumb_default.png', + title : 'Spee.ch', + }; + this.auth = { + sessionKey: 'default', + }; + this.details = { + description: 'Open-source, decentralized image and video sharing.', + host : 'default', + port : 3000, + title : 'Spee.ch', + twitter : '@spee_ch', + }; + this.publishing = { + additionalClaimAddresses: [], + disabled : false, + disabledMessage : 'Please check back soon.', + primaryClaimAddress : 'default', + thumbnailChannel : 'default', + thumbnailChannelId : 'default', + uploadDirectory : '/home/lbry/Uploads', + }; +}; + +module.exports = new SiteConfig(); diff --git a/config/slackConfig.js b/config/slackConfig.js index cceadab6..8cb66f8b 100644 --- a/config/slackConfig.js +++ b/config/slackConfig.js @@ -2,15 +2,6 @@ function SlackConfig () { this.slackWebHook = 'default'; this.slackErrorChannel = 'default'; this.slackInfoChannel = 'default'; - this.configure = (config) => { - if (!config) { - return console.log('No slack config received.'); - } - const {slackWebHook, slackErrorChannel, slackInfoChannel} = config; - this.slackWebHook = slackWebHook; - this.slackErrorChannel = slackErrorChannel; - this.slackInfoChannel = slackInfoChannel; - }; }; module.exports = new SlackConfig(); diff --git a/config/slackConfig.js.example b/config/slackConfig.js.example new file mode 100644 index 00000000..8cb66f8b --- /dev/null +++ b/config/slackConfig.js.example @@ -0,0 +1,7 @@ +function SlackConfig () { + this.slackWebHook = 'default'; + this.slackErrorChannel = 'default'; + this.slackInfoChannel = 'default'; +}; + +module.exports = new SlackConfig(); diff --git a/devConfig/sequelizeCliConfig.example.js b/devConfig/sequelizeCliConfig.js.example similarity index 100% rename from devConfig/sequelizeCliConfig.example.js rename to devConfig/sequelizeCliConfig.js.example diff --git a/devConfig/testingConfig.example.js b/devConfig/testingConfig.js.example similarity index 100% rename from devConfig/testingConfig.example.js rename to devConfig/testingConfig.js.example