You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-8Lines changed: 25 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,10 +101,27 @@ Environment variables (will overwrite other server configs)
101
101
| variables | example values | description |
102
102
| --------- | ------ | ----------- |
103
103
| NODE_ENV |`production` or `development`| set current environment (will apply corresponding settings in the `config.json`) |
104
-
| DOMAIN |`hackmd.io`| domain name |
105
-
| URL_PATH |`hackmd`| sub url path, like `www.example.com/<URL_PATH>`|
106
-
| PORT |`80`| web app port |
107
104
| DEBUG |`true` or `false`| set debug mode, show more logs |
105
+
| HMD_DOMAIN |`hackmd.io`| domain name |
106
+
| HMD_URL_PATH |`hackmd`| sub url path, like `www.example.com/<URL_PATH>`|
107
+
| HMD_PORT |`80`| web app port |
108
+
| HMD_ALLOW_ORIGIN |`localhost, hackmd.io`| domain name whitelist (use comma to separate) |
109
+
| HMD_PROTOCOL_USESSL |`true` or `false`| set to use ssl protocol for resources path (only applied when domain is set) |
110
+
| HMD_URL_ADDPORT |`true` or `false`| set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set) |
111
+
| HMD_FACEBOOK_CLIENTID | no example | Facebook API client id |
112
+
| HMD_FACEBOOK_CLIENTSECRET | no example | Facebook API client secret |
113
+
| HMD_TWITTER_CONSUMERKEY | no example | Twitter API consumer key |
114
+
| HMD_TWITTER_CONSUMERSECRET | no example | Twitter API consumer secret |
115
+
| HMD_GITHUB_CLIENTID | no example | GitHub API client id |
116
+
| HMD_GITHUB_CLIENTSECRET | no example | GitHub API client secret |
117
+
| HMD_GITLAB_BASEURL | no example | GitLab authentication endpoint, set to use other endpoint than GitLab.com (optional) |
118
+
| HMD_GITLAB_CLIENTID | no example | GitLab API client id |
119
+
| HMD_GITLAB_CLIENTSECRET | no example | GitLab API client secret |
120
+
| HMD_DROPBOX_CLIENTID | no example | Dropbox API client id |
121
+
| HMD_DROPBOX_CLIENTSECRET | no example | Dropbox API client secret |
122
+
| HMD_GOOGLE_CLIENTID | no example | Google API client id |
123
+
| HMD_GOOGLE_CLIENTSECRET | no example | Google API client secret |
124
+
| HMD_IMGUR_CLIENTID | no example | Imgur API client id |
108
125
109
126
Server settings `config.json`
110
127
---
@@ -117,8 +134,8 @@ Server settings `config.json`
117
134
| port |`80`| web app port |
118
135
| alloworigin |`['localhost']`| domain name whitelist |
119
136
| usessl |`true` or `false`| set to use ssl server (if true will auto turn on `protocolusessl`) |
120
-
| protocolusessl |`true` or `false`| set to use ssl protocol for resources path |
121
-
| urladdport |`true` or `false`| set to add port on callback url (port 80 or 443 won't applied) |
137
+
| protocolusessl |`true` or `false`| set to use ssl protocol for resources path (only applied when domain is set) |
138
+
| urladdport |`true` or `false`| set to add port on callback url (port 80 or 443 won't applied) (only applied when domain is set) |
122
139
| usecdn |`true` or `false`| set to use CDN resources or not |
123
140
| db |`{ "dialect": "sqlite", "storage": "./db.hackmd.sqlite" }`| set the db configs, [see more here](http://sequelize.readthedocs.org/en/latest/api/sequelize/)|
124
141
| sslkeypath |`./cert/client.key`| ssl key path (only need when you set usessl) |
@@ -144,10 +161,10 @@ Server settings `config.json`
144
161
Third-party integration api key settings
145
162
---
146
163
147
-
| service |file path| description |
164
+
| service |settings location| description |
148
165
| ------- | --------- | ----------- |
149
-
| facebook, twitter, github, gitlab, dropbox, google |`config.json`| for signin |
150
-
| imgur |`config.json`| for image upload |
166
+
| facebook, twitter, github, gitlab, dropbox, google |environment variables or `config.json`| for signin |
167
+
| imgur |environment variables or `config.json`| for image upload |
151
168
| google drive, dropbox |`public/js/config.js`| for export and import |
0 commit comments