diff options
author | Arnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr> | 2017-10-02 10:02:54 +0200 |
---|---|---|
committer | Arnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr> | 2017-10-02 10:02:54 +0200 |
commit | 6ef52939787c819e2155b2250e3c70b8df8c96ae (patch) | |
tree | 3691a6002d27954905649708674dae6d567a5652 | |
parent | decodeURI (diff) | |
parent | readme (diff) |
Merge branch 'master' of github.com:Titely/markdown-viewer
-rw-r--r-- | README.md | 13 | ||||
-rw-r--r-- | app.js | 4 |
2 files changed, 15 insertions, 2 deletions
@@ -1 +1,14 @@ # markdown-viewer + +markdown-viewer is a Node.js application which display markdown files from the specified directory (md by default, can also be a symlink). Files are converted into HTTP pages with github style. + +## To run +``` +git clone https://github.com/Titely/markdown-viewer.git +cd markdown-viewer +``` +Here you will need to create the `md` directory or link where will be stored your .md files. Then: +``` +npm install +npm start +``` @@ -56,7 +56,7 @@ app.get('/', function(req, res) { }); app.get('*', function(req, res) { - console.log("[" + new Date() + "] > " + "404 - " + req.url); + console.error("[" + new Date() + "] > " + "404 - " + req.url); fs.readFile('public/404.md', 'utf8', function(err, data) { if (err) return console.log(err); @@ -77,5 +77,5 @@ app.get('*', function(req, res) { var server = app.listen(80, function() { var host = server.address().address; var port = server.address().port; - console.log("App listening at http://%s:%s", host, port); + console.log("[" + new Date() + "] > " + "App listening at http://%s:%s", host, port); }); |