Updated README.md, update project structure, remove deploy instruction and add get started section
This commit is contained in:
parent
69538a26ad
commit
90ae615236
1 changed files with 14 additions and 33 deletions
45
README.md
45
README.md
|
@ -9,12 +9,13 @@ Still in early stage, feel free to fork or contribute to this.
|
||||||
|
|
||||||
Thanks for your using! :smile:
|
Thanks for your using! :smile:
|
||||||
|
|
||||||
Operational Transformation
|
Get started
|
||||||
---
|
---
|
||||||
From 0.3.2, we start support operational transformation.
|
1. Install PostgreSQL and MongoDB (yes, currently we need both)
|
||||||
Which make concurrent editing safe and not break up other users' operations.
|
2. Import database schema, see more on below
|
||||||
Even more, now can show other clients' selections.
|
3. Setup the configs, see more on below
|
||||||
See more at http://operational-transformation.github.io/
|
4. Setup environment variables, which will overwrite the configs
|
||||||
|
5. Run the server as you like (node, forever, pm2)
|
||||||
|
|
||||||
Database dependency
|
Database dependency
|
||||||
---
|
---
|
||||||
|
@ -32,8 +33,6 @@ Structure
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
hackmd/
|
hackmd/
|
||||||
├── logs/ --- server logs
|
|
||||||
├── backups/ --- db backups
|
|
||||||
├── tmp/ --- temporary files
|
├── tmp/ --- temporary files
|
||||||
├── lib/ --- server libraries
|
├── lib/ --- server libraries
|
||||||
└── public/ --- client files
|
└── public/ --- client files
|
||||||
|
@ -43,16 +42,12 @@ hackmd/
|
||||||
└── views/ --- view templates
|
└── views/ --- view templates
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure
|
Configuration files
|
||||||
---
|
---
|
||||||
There are some config you need to change in below files
|
There are some config you need to change in below files
|
||||||
```
|
```
|
||||||
./Procfile --- for heroku start
|
|
||||||
./run.sh --- for forever start
|
|
||||||
./processes.json --- for pm2 start
|
|
||||||
./config.js --- for server settings
|
./config.js --- for server settings
|
||||||
./public/js/common.js --- for client settings
|
./public/js/index.js --- for client settings
|
||||||
./hackmd --- for logrotate
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Client-side index.js settings
|
Client-side index.js settings
|
||||||
|
@ -99,25 +94,11 @@ Server-side config.js settings
|
||||||
| documentmaxlength | `100000` | note max length |
|
| documentmaxlength | `100000` | note max length |
|
||||||
| facebook, twitter, github, dropbox, imgur | multiple values | your own api keys, see source code for details |
|
| 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.**
|
Operational Transformation
|
||||||
|
|
||||||
We using `pm2` to run server.
|
|
||||||
See [here](https://github.com/Unitech/pm2) for details.
|
|
||||||
|
|
||||||
You can use SSL to encrypt your site by passing certificate path in the `config.js` and set `usessl=true`
|
|
||||||
|
|
||||||
Run a server
|
|
||||||
---
|
---
|
||||||
- forever: `bash run.sh`
|
From 0.3.2, we start support operational transformation.
|
||||||
- pm2: `pm2 start processes.json`
|
Which make concurrent editing safe and not break up other users' operations.
|
||||||
|
Even more, now can show other clients' selections.
|
||||||
Stop a server
|
See more at http://operational-transformation.github.io/
|
||||||
---
|
|
||||||
- forever: `forever stop hackmd`
|
|
||||||
- pm2: `pm2 stop hackmd`
|
|
||||||
|
|
||||||
Backup db
|
|
||||||
---
|
|
||||||
To backup the db, type `bash backup.sh`
|
|
||||||
|
|
||||||
**License under MIT.**
|
**License under MIT.**
|
Loading…
Reference in a new issue