From 10c9811fc534a2738c19d8f74a447ed500b730a2 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Thu, 2 Jul 2015 00:10:20 +0800 Subject: Jump to 0.3.1 --- README.md | 58 ++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 20 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 6762b28a..ab87217c 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,70 @@ -HackMD 0.2.9 +HackMD 0.3.1 === -HackMD is a realtime collaborative markdown notes on all platforms. -Inspired by Hackpad, but more focusing on speed and flexibility. -Still in early stage, feel free to fork or contribute to this. +HackMD is a realtime collaborative markdown notes on all platforms. +Inspired by Hackpad, but more focusing on speed and flexibility. +Still in early stage, feel free to fork or contribute to this. Thanks for your using! :smile: -Dependency +Database dependency --- - PostgreSQL 9.3.6 or 9.4.1 - MongoDB 3.0.2 -Import db schema +Import database schema --- -The notes are store in PostgreSQL, the schema is in the `hackmd_schema.sql` +The notes are store in PostgreSQL, the schema is in the `hackmd_schema.sql` To import the sql file in PostgreSQL, type `psql -i hackmd_schema.sql` -The users, temps and sessions are store in MongoDB, which don't need schema, so just make sure you have the correct connection string. +The users, temps and sessions are store in MongoDB, which don't need schema, so just make sure you have the correct connection string. -Config +Structure +--- +``` +hackmd/ +├── logs/ --- server logs +├── backups/ --- db backups +├── tmp/ --- temporary files +├── lib/ --- server libraries +└── public/ --- client files + ├── css/ --- css styles + ├── js/ --- js scripts + ├── vendor/ --- vendor includes + └── views/ --- view templates +``` + +Configure --- There are some config you need to change in below files ``` -./run.sh -./config.js -./public/js/common.js +./Procfile --- for heroku start +./run.sh --- for forever start +./processes.json --- for pm2 start +./config.js --- for server settings +./public/js/common.js --- for client settings +./hackmd --- for logrotate ``` -The script `run.sh`, it's for someone like me to run the server via npm package `forever`, and can passing environment variable to the server, like heroku does. +**From 0.3.1, we no longer recommend using `forever` to run your server.** -To install `forever`, just type `npm install forever -g` +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 --- -To run the server, type `bash run.sh` -Log will be at `~/.forever/hackmd.log` + - forever: `bash run.sh` + - pm2: `pm2 start processes.json` Stop a server --- -To stop the server, simply type `forever stop hackmd` + - forever: `forever stop hackmd` + - pm2: `pm2 stop hackmd` Backup db --- -To backup the db, type `bash backup.sh` -Backup files will be at `./backups/` - +To backup the db, type `bash backup.sh` **License under MIT.** \ No newline at end of file -- cgit v1.2.3