a Markdown middleware HTTP server
mdmw is a Markdown middleware HTTP server. It renders Markdown files and serves them back as HTML. It’s not meant to be your sole www-facing webserver as it cannot serve non-markdown files.
You can use mdmw to host a micro-blog, quickly share documents, host documentation, etc.
mdmw supports two storage drivers (i.e. where it pulls markdown files from):
mdmw exposes an HTTP server and uses the URI as the path for the markdown files.
Table of Contents generated with DocToc
docker pull kamaln7/mdmw:latest
/usr/local/bin
or wherever you would likemdmw listens on localhost:4000
by default. Refer to the options section below for details on how to change that. If you are using the docker image, you will need to expose port 4000
See the options section below on how to configure mdmw. You can run docker run -p 4000 kamaln7/mdmw
(use -e
or --env-file
to pass configuration options) or run mdmw
directly if you chose to not use Docker.
Usage:
mdmw [flags]
Flags:
--config string config file (default is ./.mdmw.yaml)
--filesystem.path string path to markdown files (default "./files")
-h, --help help for mdmw
--listenaddress string address to listen on (default "localhost:4000")
--outputtemplate string path to HTML output template
--spaces.auth.access string DigitalOcean Spaces access key
--spaces.auth.secret string DigitalOcean Spaces secret key
--spaces.cache string DigitalOcean Spaces cache time (default "0")
--spaces.path string DigitalOcean Spaces files path (default "/")
--spaces.region string DigitalOcean Spaces region
--spaces.space string DigitalOcean Spaces space name
--storage string storage driver to use (default "filesystem")
--validateextension validate that files have a markdown extension (default true)
There are three ways to configure mdmw. examples for each can be found below
-config ./path/to/config
0.0.0.0:8080
listenaddress: 0.0.0.0:8080
storage: spaces
spaces:
auth:
access: ACCESS KEY GOES HERE
secret: SECRET KEY GOES HERE
region: ams3
space: SPACE NAME GOES HERE
mdmw \
--listenaddress 0.0.0.0:8000 \
--storage spaces \
--spaces.auth.access "ACCESS KEY GOES HERE" \
--spaces.auth.secret "SECRET KEY GOES HERE" \
--spaces.region ams3 \
--spaces.space "SPACE NAME GOES HERE"
LISTENADDRESS=0.0.0.0:8000 \
STORAGE=spaces \
SPACES_AUTH_ACCESS=ACCESS KEY GOES HERE \
SPACES_AUTH_SECRET=SECRET KEY GOES HERE \
SPACES_REGION=ams3 \
SPACES_SPACE=SPACE NAME GOES HERE \
mdmw
MIT. see LICENSE