aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-04-23 21:28:41 +0200
committerache <ache@ache.one>2018-04-23 21:28:54 +0200
commit0fd2dd74000bbf66bafb6fe95e4903b8bdd20884 (patch)
treeb74416ac98ab440124dc4bb6030d04e62d7d63d9 /app.js
parentCan use script inside a md file (diff)
xo advises
Diffstat (limited to 'app.js')
-rw-r--r--app.js17
1 files changed, 1 insertions, 16 deletions
diff --git a/app.js b/app.js
index 3789c2a..9b49378 100644
--- a/app.js
+++ b/app.js
@@ -3,6 +3,7 @@
const fs = require('fs');
const dirTree = require('directory-tree');
const express = require('express');
+const report = require('vfile-reporter');
const hmd = require('./tohtml');
@@ -13,13 +14,9 @@ process.on('uncaughtException', err => {
console.error(`[${new Date()}] > Error - ${err}`);
});
-const report = require('vfile-reporter');
-
const useLandScript = '';
const rawButton = '<button class="raw_button" ><div><div>Raw</div></div></button></form>';
-
-
app.use(express.static('public'));
app.get(`/${path}/*`, (req, res) => {
@@ -50,18 +47,6 @@ app.get(`/${path}/*`, (req, res) => {
return console.log(err);
}
- // Remark()
- /* Debbug comment
- const a = unified()
- .use(remark)
- .use(lineInput)
- .use(textInput)
- .use(html, {allowDangerousHTML: true})
- .use(raw)
- .parse(data)
- console.log(inspect(a));
- */
-
hmd(data, (err, file) => {
res.send(`${String(file) + useLandScript
}<a href="${url}?raw=true" class="no-style">${rawButton}</a>`);