codimd/config.js

75 lines
2.2 KiB
JavaScript
Raw Normal View History

2015-05-04 07:53:29 +00:00
//config
var path = require('path');
2015-05-15 04:58:13 +00:00
var domain = process.env.DOMAIN;
var testport = '3000';
var testsslport = '3001';
var port = process.env.PORT || testport;
var sslport = process.env.SSLPORT || testsslport;
var usessl = false;
var urladdport = true; //add port on getserverurl
2015-05-04 07:53:29 +00:00
var config = {
debug: true,
2015-07-01 16:10:20 +00:00
version: '0.3.1',
2015-05-15 04:58:13 +00:00
domain: domain,
alloworigin: ['add here to allow origin to cross'],
testport: testport,
testsslport: testsslport,
port: port,
sslport: sslport,
sslkeypath: 'change this',
sslcertpath: 'change this',
sslcapath: ['change this'],
usessl: usessl,
getserverurl: function() {
if(usessl)
return 'https://' + domain + (sslport == 443 || !urladdport ? '' : ':' + sslport);
else
return 'http://' + domain + (port == 80 || !urladdport ? '' : ':' + port);
},
2015-05-04 07:53:29 +00:00
//path
tmppath: "./tmp/",
defaultnotepath: path.join(__dirname, '/public', "default.md"),
defaultfeaturespath: path.join(__dirname, '/public', "features.md"),
hackmdpath: path.join(__dirname, '/public/views', "index.ejs"),
errorpath: path.join(__dirname, '/public/views', "error.ejs"),
prettypath: path.join(__dirname, '/public/views', 'pretty.ejs'),
//db string
2015-05-15 04:58:13 +00:00
postgresqlstring: "change this",
mongodbstring: "change this",
2015-05-04 07:53:29 +00:00
//constants
featuresnotename: "features",
2015-05-15 04:58:13 +00:00
sessionname: 'change this',
sessionsecret: 'change this',
2015-05-04 07:53:29 +00:00
sessionlife: 14 * 24 * 60 * 60 * 1000, //14 days
sessiontouch: 1 * 3600, //1 hour
heartbeatinterval: 5000,
heartbeattimeout: 10000,
//auth
facebook: {
2015-05-15 04:58:13 +00:00
clientID: 'change this',
clientSecret: 'change this',
2015-05-04 07:53:29 +00:00
callbackPath: '/auth/facebook/callback'
},
twitter: {
2015-05-15 04:58:13 +00:00
consumerKey: 'change this',
consumerSecret: 'change this',
2015-05-04 07:53:29 +00:00
callbackPath: '/auth/twitter/callback'
},
github: {
2015-05-15 04:58:13 +00:00
clientID: 'change this',
clientSecret: 'change this',
2015-05-04 07:53:29 +00:00
callbackPath: '/auth/github/callback'
},
dropbox: {
2015-05-15 04:58:13 +00:00
clientID: 'change this',
clientSecret: 'change this',
2015-05-04 07:53:29 +00:00
callbackPath: '/auth/dropbox/callback'
2015-05-15 04:58:13 +00:00
},
imgur: {
clientID: 'change this'
2015-05-04 07:53:29 +00:00
}
};
module.exports = config;