From 2411dffa2ce997370a636ed56cc73bcc4661ec7f Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Wed, 7 Mar 2018 15:17:35 +0100 Subject: Change config to camel case with backwards compatibility This refactors the configs a bit to now use camel case everywhere. This change should help to clean up the config interface and make it better understandable. Signed-off-by: Sheogorath --- lib/config/default.js | 68 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 35 deletions(-) (limited to 'lib/config/default.js') diff --git a/lib/config/default.js b/lib/config/default.js index 7407ec60..19ddccf6 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -2,11 +2,11 @@ module.exports = { domain: '', - urlpath: '', + urlPath: '', port: 3000, - urladdport: false, - alloworigin: ['localhost'], - usessl: false, + urlAddPort: false, + allowOrigin: ['localhost'], + useSSL: false, hsts: { enable: true, maxAgeSeconds: 31536000, @@ -21,42 +21,40 @@ module.exports = { upgradeInsecureRequests: 'auto', reportURI: undefined }, - protocolusessl: false, - usecdn: true, - allowanonymous: true, - allowanonymousedits: false, - allowfreeurl: false, - defaultpermission: 'editable', - dburl: '', + protocolUseSSL: false, + useCDN: true, + allowAnonymous: true, + allowAnonymousEdits: false, + allowFreeURL: false, + defaultPermission: 'editable', + dbURL: '', db: {}, // ssl path - sslkeypath: '', - sslcertpath: '', - sslcapath: '', - dhparampath: '', + sslKeyPath: '', + sslCertPath: '', + sslCAPath: '', + dhParamPath: '', // other path - tmppath: './tmp', - defaultnotepath: './public/default.md', - docspath: './public/docs', - indexpath: './public/views/index.ejs', - hackmdpath: './public/views/hackmd.ejs', - errorpath: './public/views/error.ejs', - prettypath: './public/views/pretty.ejs', - slidepath: './public/views/slide.ejs', + tmpPath: './tmp', + defaultNotePath: './public/default.md', + docsPath: './public/docs', + indexPath: './public/views/index.ejs', + hackmdPath: './public/views/hackmd.ejs', + errorPath: './public/views/error.ejs', + prettyPath: './public/views/pretty.ejs', + slidePath: './public/views/slide.ejs', // session - sessionname: 'connect.sid', - sessionsecret: 'secret', - sessionlife: 14 * 24 * 60 * 60 * 1000, // 14 days - staticcachetime: 1 * 24 * 60 * 60 * 1000, // 1 day + sessionName: 'connect.sid', + sessionSecret: 'secret', + sessionLife: 14 * 24 * 60 * 60 * 1000, // 14 days + staticCacheTime: 1 * 24 * 60 * 60 * 1000, // 1 day // socket.io - heartbeatinterval: 5000, - heartbeattimeout: 10000, + heartbeatInterval: 5000, + heartbeatTimeout: 10000, // document - documentmaxlength: 100000, + documentMaxLength: 100000, // image upload setting, available options are imgur/s3/filesystem - imageuploadtype: 'filesystem', - // legacy variable name for imageuploadtype - imageUploadType: undefined, + imageUploadType: 'filesystem', imgur: { clientID: undefined }, @@ -133,6 +131,6 @@ module.exports = { } }, email: true, - allowemailregister: true, - allowpdfexport: true + allowEmailRegister: true, + allowPDFExport: true } -- cgit v1.2.3