UNPKG

http-server-md

Version:

A configurable HTTP server that serves markdown files rendered to HTML with markdown-it

14 lines (10 loc) 229 B
// eslint-why ctx assign const render = require('../render') /** * @private */ const serveMD = async (srcPath, config, ctx) => { ctx.type = 'html' ctx.body = await render(srcPath, config, ctx) } module.exports = serveMD