HackMD/config.js

78 lines
2.3 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,
usecdn: false,
2015-07-11 04:52:04 +00:00
version: '0.3.2',
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"),
indexpath: path.join(__dirname, '/public/', "index.ejs"),
2015-05-04 07:53:29 +00:00
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,
documentmaxlength: 100000,
2015-05-04 07:53:29 +00:00
//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;