servemd

0.0.1 • Public • Published

servemd

Serves Markdown files over HTTP.

No magic, just serves static files out of a directory. If a file is a .md file, it will render the Markdown into HTML. It will serve README.md or index.html when a directory is requested if either exist.

By default the Bootstrap (v2.3.1) CSS file is linked to the generated HTML documents. Markdown is parsed by the marked library.

I made this project because I wanted the easiest way to preview documentation files that would be uploaded to Github. Many existing utilities change the file name (e.g. request test.html for the test.md file) or are too hard to setup. Note that this is probably not secure, it is not meant for development purposes.

Installation

Install using NPM: npm install servemd -g

Usage

servemd &                   # Starts the server on port 3000 
curl http://localhost:3000/ # Get the contents of the README.md file rendered 

Options:

servemd -d ~/           # Serves files from specified directory 
servemd -p 1234         # Listens on the specified port 
servemd -s mystyles.css # Link the specified CSS file to the HTML 
servemd --help          # Get more help 

Notes

It currently does not do any syntax highlighting.

Readme

Keywords

none

Package Sidebar

Install

npm i servemd

Weekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • conradz