micro-markdown.now.sh
Microservice utility for parsing markdown, with support for YAML front matter.
usage
The utility can be used via POST or GET, to take advantage of the slight performance increase for GET requests. Keep in mind, GET requests are limited to ~2000 characters.
const md = `---
title: Markdown Microservice
---
# Heading One
Paragraph text
`
with POST
const md = `---
fetch(`https://micro-markdown.now.sh/api`, {
method: 'POST',
body: md
})
.then(res => res.json())
with GET
const md = `---
fetch(`https://micro-markdown.now.sh/api?md=${encodeURIComponent(md)}`)
.then(res => res.json())
response
{
meta: {
title: 'Markdown Microservice'
},
html: '<h1>Heading One</h1>\n<p>Paragraph text</p>\n'
}