aboutsummaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/server.js b/server.js
index 39c3a38..2f45e95 100644
--- a/server.js
+++ b/server.js
@@ -12,7 +12,8 @@ async function init()
const build = {
"./index.html": buildMain,
"./index.css": buildDefault,
- "./404/index.css": buildDefault
+ "./404/index.css": buildDefault,
+ "./help.png": buildImage
};
const errorPath = "./404/index.html";
@@ -80,7 +81,6 @@ async function buildMain(args)
{
const path = args["path"];
const query = args["query"];
- console.log(query);
const foods = args["foods"];
let index;
if (typeof query.index === "string")
@@ -172,6 +172,13 @@ async function buildDefault(args)
return data.toString("utf-8");
}
+async function buildImage(args)
+{
+ const path = args["path"];
+ const data = await openFile(path);
+ return data;
+}
+
function build_replace(s, dict)
{