Marked-own
(WIP) Markdown publishing server.
CLI
npm install marked-own --global
mo
Command
<!-- index.md -->
**Hello marked-own**
tree .
# .
# └── index.md
mo
# ______ _ _
# | ___ \ | | | |
# | | _ | | ____ ____| | _ ____ _ | |___ ___ _ _ _ ____
# | || || |/ _ |/ ___) | / ) _ ) || (___) _ \| | | | _ \
# | || || ( ( | | | | |< ( (/ ( (_| | | |_| | | | | | | |
# |_||_||_|\_||_|_| |_| \_)____)____| \___/ \____|_| |_|
#
# http://localhost:59798
curl "http://localhost:59798" # or "http://localhost:59798/index"
# <p><strong>Hello marked-own</strong></p>
mo --help
check the list of options.
API
npm install marked-own --save
markedOwn(cwd) -> middleware
Response the compiled html if the .md
matches the req.url
.
tree .
# .
# └── index.md
babel-node server.js
# boot on http://localhost:59798
curl "http://localhost:59798" # or "http://localhost:59798/index"
# <p><strong>Hello marked-own</strong></p>
// server.js
import express from 'express';
import markedOwn from 'marked-own';
const port = 59798;
const app = express();
app.use(markedOwn(__dirname));
app.listen(port, () => {
console.log(`boot on http://localhost:${port}`);
});
Test
git clone https://github.com/59naga/marked-own.git
cd marked-own
npm install
npm test