From 2faffdf8c08c8fd8b2bfc8f2bd969ede0b5c1893 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Tue, 26 Feb 2019 12:06:47 +0200 Subject: [PATCH] stupid shit --- .gitignore | 1 + applications/highlight-termbin/.gitignore | 1 + applications/highlight-termbin/index.js | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 applications/highlight-termbin/.gitignore diff --git a/.gitignore b/.gitignore index c85f9cf..487c0a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /*/**/config.json /node_modules/ /package-lock.json +*.html diff --git a/applications/highlight-termbin/.gitignore b/applications/highlight-termbin/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/applications/highlight-termbin/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/applications/highlight-termbin/index.js b/applications/highlight-termbin/index.js index a371644..02054ac 100644 --- a/applications/highlight-termbin/index.js +++ b/applications/highlight-termbin/index.js @@ -67,14 +67,14 @@ async function init () { return next() } - let in = config.index - if (in.indexOf('/') !== 0) { - in = path.join(__dirname, in) + let inp = config.index + if (inp.indexOf('/') !== 0) { + inp = path.join(__dirname, inp) } else { - in = path.resolve(in) + inp = path.resolve(inp) } - res.sendFile(in) + res.sendFile(inp) }) return router