tinymdserv
v1.0.21
Published
Tiny Markdown Server
Downloads
107
Readme
TinyMDServ
Install
npm install -g tinymdserv
Edit
- Create home page docs/index.md
# Home
Hello
- Create template docs/template.ejs
<html>
<head>
<meta charset="utf-8" />
<meta lang="en" />
<title>
<%=title %>
</title>
</head>
<body>
<%-content %>
</body>
</html>
- Create template docs/search.ejs
<html>
<head>
<meta charset="utf-8" />
<meta lang="en" />
<title>
<%=title %>
</title>
</head>
<body>
<ul>
<% content.forEach(path => { %><li><a href='<%-path %>'><%-path %></a></li>
<% }) %></ul>
</body>
</html>
Run
tinymdserv [<port_number>] [<docs_full_path>]
- Default port number is 80.
- Default document path is docs under current path.
Example
tinymdserv 80
tinymdserv 80 C:\docs
node app.js 8080 ./docs