Pad Thing with CodiMD
Jump to navigation
Jump to search
CodiMD is a browser-based real-time collaborative markdown notes/pad kind of thing.
Prerequisites
- Node v8.x https://nodejs.org/dist/latest-v8.x (tested with v8.15, support for v10.x is on the way)
- A MySQL database
- a user with limited rights
- SSL certs
- NGINX HTTP server
Installation and Configuration
- get latest CodiMD stable release from https://github.com/hackmdio/codimd/releases (1.2.1 at time of writing)
wget https://github.com/hackmdio/codimd/archive/1.2.1.tar.gz tar xvf 1.2.1.tar.gz
- give it a place to stay if you like...
mv codimd-1.2.1 /path/to/somewhere/codimd cd /path/to/somewhere/codimd
- Edit
config.json
{
"production": {
"host": "localhost",
"debug": "false",
"port": "3000",
"domain": "${FQDN}",
"sessionSecret": "${RANDOM_CRAP}",
"useCDN": "false",
"protocolUseSSL": "true",
"allowOrigin": "['localhost']",
"allowFreeURL": "true",
"forbiddenNoteIDs": "['robots.txt']",
"imageUploadType": "filesystem",
"db": {
"username": "${DB_USER}",
"password": "${DB_USER_PASSWORD}",
"database": "${DB}",
"host": "localhost",
"port": "3306",
"dialect": "mysql"
},
"csp": {
"enable": "true",
"directives": {
"scriptSrc": "${FQDN}"
},
"upgradeInsecureRequests": "auto",
"addDefaults": "true"
}
}
}