aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr>2017-10-02 10:02:54 +0200
committerArnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr>2017-10-02 10:02:54 +0200
commit6ef52939787c819e2155b2250e3c70b8df8c96ae (patch)
tree3691a6002d27954905649708674dae6d567a5652
parentdecodeURI (diff)
parentreadme (diff)
Merge branch 'master' of github.com:Titely/markdown-viewer
-rw-r--r--README.md13
-rw-r--r--app.js4
2 files changed, 15 insertions, 2 deletions
diff --git a/README.md b/README.md
index a46666b..e3470f1 100644
--- a/README.md
+++ b/README.md
@@ -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
+```
diff --git a/app.js b/app.js
index de17c41..055a64c 100644
--- a/app.js
+++ b/app.js
@@ -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);
});