CodiMD - Realtime collaborative markdown notes on all platforms. https://hackmd.io/c/codimd-documentation
Go to file
Wu Cheng-Han 4702b83adc Revert index.html select2 cdn back to own server, because we using an older version of it 2015-07-11 12:02:27 +08:00
backups Jump to 0.3.1 2015-07-02 00:10:20 +08:00
lib Change note action "share" to "publish" to avoid misleading 2015-07-06 13:51:55 +08:00
logs Jump to 0.3.1 2015-07-02 00:10:20 +08:00
public Revert index.html select2 cdn back to own server, because we using an older version of it 2015-07-11 12:02:27 +08:00
tmp Jump to 0.3.1 2015-07-02 00:10:20 +08:00
LICENSE Initial commit 2015-05-04 14:06:46 +08:00
Procfile First commit, version 0.2.7 2015-05-04 15:53:29 +08:00
README.md Update README.md 2015-07-02 00:15:34 +08:00
app.js Change note action "share" to "publish" to avoid misleading 2015-07-06 13:51:55 +08:00
backup.sh Marked as 0.2.9 2015-06-01 18:04:25 +08:00
config.js Jump to 0.3.1 2015-07-02 00:10:20 +08:00
hackmd Jump to 0.3.1 2015-07-02 00:10:20 +08:00
hackmd_schema.sql Added database schema from pg_dump 2015-05-08 11:47:41 +08:00
package.json Jump to 0.3.1 2015-07-02 00:10:20 +08:00
processes.json Jump to 0.3.1 2015-07-02 00:10:20 +08:00
run.sh Jump to 0.3.1 2015-07-02 00:10:20 +08:00

README.md

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.

Thanks for your using! 😄

Database dependency

  • PostgreSQL 9.3.6 or 9.4.1
  • MongoDB 3.0.2

Import database schema

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.

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

./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

From 0.3.1, we no longer recommend using forever to run your server.

We using pm2 to run server.
See here 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
  • pm2: pm2 start processes.json

Stop a server

  • forever: forever stop hackmd
  • pm2: pm2 stop hackmd

Backup db

To backup the db, type bash backup.sh

License under MIT.