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
+5-15Lines changed: 5 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Get started
59
59
2. Enter the directory and type `bin/setup`, which will install npm dependencies and create configs. The setup script is written in Bash, you would need bash as a prerequisite.
60
60
3. Setup the configs, see more below
61
61
4. Setup environment variables which will overwrite the configs
62
-
5. Build front-end bundle by `npm run build:prod` (use `npm run build:dev` if you are in development)
62
+
5. Build front-end bundle by `npm run build` (use `npm run dev` if you are in development)
63
63
6. Run the server as you like (node, forever, pm2)
64
64
65
65
Upgrade guide
@@ -70,7 +70,7 @@ If you are upgrading HackMD from an older version, follow these steps:
70
70
1. Fully stop your old server first (important)
71
71
2.`git pull` or do whatever that updates the files
72
72
3.`npm install` to update dependencies
73
-
4. Build front-end bundle by `npm run build:prod` (use `npm run build:dev` if you are in development)
73
+
4. Build front-end bundle by `npm run build` (use `npm run dev` if you are in development)
74
74
5. Modify the file named `.sequelizerc`, change the value of the variable `url` with your db connection string
75
75
For example: `postgres://username:password@localhost:5432/hackmd`
76
76
6. Run `node_modules/.bin/sequelize db:migrate`, this step will migrate your db to the latest schema
@@ -97,19 +97,9 @@ Configuration files
97
97
There are some configs you need to change in the files below
98
98
99
99
```
100
-
./config.json --- for server settings
101
-
./public/js/config.js --- for client settings
100
+
./config.json ----application settings
102
101
```
103
102
104
-
Client settings `config.js`
105
-
---
106
-
107
-
| variables | example values | description |
108
-
| --------- | ------ | ----------- |
109
-
| debug |`true` or `false`| set debug mode, show more logs |
110
-
| domain |`localhost`| domain name |
111
-
| urlpath |`hackmd`| sub url path, like: `www.example.com/<urlpath>`|
112
-
113
103
Environment variables (will overwrite other server configs)
114
104
---
115
105
@@ -158,7 +148,7 @@ Environment variables (will overwrite other server configs)
158
148
| HMD_S3_REGION |`ap-northeast-1`| AWS S3 region |
159
149
| HMD_S3_BUCKET | no example | AWS S3 bucket name |
160
150
161
-
Server settings `config.json`
151
+
Application settings `config.json`
162
152
---
163
153
164
154
| variables | example values | description |
@@ -207,7 +197,7 @@ Third-party integration api key settings
207
197
| ------- | --------- | ----------- |
208
198
| facebook, twitter, github, gitlab, dropbox, google, ldap | environment variables or `config.json`| for signin |
209
199
| imgur | environment variables or `config.json`| for image upload |
210
-
| google drive, dropbox |`public/js/config.js`| for export and import |
200
+
| google drive(`google/apiKey`, `google/clientID`), dropbox(`dropbox/appKey`)|`config.json`| for export and import |
0 commit comments