summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/README.md b/README.md
index 24d00316..6044ed25 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,50 @@ There are some config you need to change in below files
./hackmd --- for logrotate
```
+Client-side index.js settings
+---
+| variables | example values | description |
+| --------- | ------ | ----------- |
+| debug | `true` or `false` | set debug mode, show more logs |
+| version | `0.3.2` | current version, must match same var in server side `config.js` |
+
+Environment variables
+---
+| variables | example values | description |
+| --------- | ------ | ----------- |
+| NODE_ENV | `production` or `development` | show current environment status |
+| DATABASE_URL | `postgresql://localhost:5432/hackmd` | PostgreSQL connection string |
+| MONGOLAB_URI | `mongodb://localhost/hackmd` | MongoDB connection string |
+| PORT | `80` | web port |
+| SSLPORT | `443` | ssl web port |
+| DOMAIN | `localhost` | domain name |
+
+Server-side config.js settings
+---
+| variables | example values | description |
+| --------- | ------ | ----------- |
+| testport | `3000` | debug web port, fallback to this when not set in environment |
+| testsslport | `3001` | debug web ssl port, fallback to this when not set in environment |
+| usessl | `true` or `false` | set to use ssl |
+| urladdport | `true` or `false` | set to add port on oauth callback url |
+| debug | `true` or `false` | set debug mode, show more logs |
+| version | `0.3.2` | currnet version, must match same var in client side `index.js` |
+| alloworigin | `['localhost']` | domain name whitelist |
+| sslkeypath | `./cert/client.key` | ssl key path |
+| sslcertpath | `./cert/hackmd_io.crt` | ssl cert path |
+| sslcapath | `['./cert/COMODORSAAddTrustCA.crt']` | ssl ca chain |
+| tmppath | `./tmp/` | temp file path |
+| postgresqlstring | `postgresql://localhost:5432/hackmd` | PostgreSQL connection string, fallback to this when not set in environment |
+| mongodbstring | `mongodb://localhost/hackmd` | MongoDB connection string, fallback to this when not set in environment |
+| sessionname | `connect.sid` | cookie session name |
+| sessionsecret | `secret` | cookie session secret |
+| sessionlife | `14 * 24 * 60 * 60 * 1000` | cookie session life |
+| sessiontouch | `1 * 3600` | cookie session touch |
+| heartbeatinterval | `5000` | socket.io heartbeat interval |
+| heartbeattimeout | `10000` | socket.io heartbeat timeout |
+| documentmaxlength | `100000` | note max length |
+| facebook, twitter, github, dropbox, imgur | multiple values | your own api keys, see source code for details |
+
**From 0.3.1, we no longer recommend using `forever` to run your server.**
We using `pm2` to run server.