summaryrefslogtreecommitdiff
path: root/config.js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-05-04 15:53:29 +0800
committerWu Cheng-Han2015-05-04 15:53:29 +0800
commit4b0ca55eb79e963523eb6c8197825e9e8ae904e2 (patch)
tree574f3923af77b37b41dbf1b00bcd7827ef724a28 /config.js
parent61eb11d23c65c9e5c493c67d055f785cbec139e2 (diff)
First commit, version 0.2.7
Diffstat (limited to 'config.js')
-rw-r--r--config.js50
1 files changed, 50 insertions, 0 deletions
diff --git a/config.js b/config.js
new file mode 100644
index 00000000..3a5c764c
--- /dev/null
+++ b/config.js
@@ -0,0 +1,50 @@
+//config
+var path = require('path');
+
+var config = {
+ debug: true,
+ version: '0.2.7',
+ domain: 'http://localhost:3000',
+ testport: '3000',
+ //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
+ postgresqlstring: "postgresql://localhost:5432/hackmd",
+ mongodbstring: "mongodb://localhost/hackmd",
+ //constants
+ featuresnotename: "features",
+ sessionname: 'please set this',
+ sessionsecret: 'please set this',
+ sessionlife: 14 * 24 * 60 * 60 * 1000, //14 days
+ sessiontouch: 1 * 3600, //1 hour
+ heartbeatinterval: 5000,
+ heartbeattimeout: 10000,
+ //auth
+ facebook: {
+ clientID: 'get yourself one',
+ clientSecret: 'get yourself one',
+ callbackPath: '/auth/facebook/callback'
+ },
+ twitter: {
+ consumerKey: 'get yourself one',
+ consumerSecret: 'get yourself one',
+ callbackPath: '/auth/twitter/callback'
+ },
+ github: {
+ clientID: 'get yourself one',
+ clientSecret: 'get yourself one',
+ callbackPath: '/auth/github/callback'
+ },
+ dropbox: {
+ clientID: 'get yourself one',
+ clientSecret: 'get yourself one',
+ callbackPath: '/auth/dropbox/callback'
+ }
+};
+
+module.exports = config; \ No newline at end of file