From 9aa42d4b133140a042d59ae6a724debd5d9e7f16 Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 1 Jan 2023 09:57:33 +0000 Subject: [PATCH] remove view engine --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 45f2ec0e..8a9711c1 100644 --- a/server.js +++ b/server.js @@ -65,9 +65,9 @@ initlog("Loaded express.js"); app.engine("html", require("ejs").renderFile); app.use(modules.express.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded app.use(modules.useragent.express()); +app.use(modules.express.json()); // for parsing application/json -app.set("view engine", "html"); - + const renderTemplate = async (res, req, template, data = {}) => { res.render( modules.path.resolve(`${templateDir}${modules.path.sep}${template}`),