From 96bc542e76741a04d8863c78f612478e3e1d242b Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Sun, 20 Jan 2019 13:09:45 +0200 Subject: [PATCH] typescript(translucid): fixed express static file path without __dirname Signed-off-by: prescientmoon --- typescript/translucid/Translucid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/translucid/Translucid.js b/typescript/translucid/Translucid.js index 0e9279b..18f2dca 100644 --- a/typescript/translucid/Translucid.js +++ b/typescript/translucid/Translucid.js @@ -18,7 +18,7 @@ class Translucid { this.midleware.push(obj); } public(path = "") { - this.app.use(`${__dirname}/../../${path}`, express.static(`${__dirname}/../../${path}`)); + this.app.use(`/${path}`, express.static(`/${path}`)); } bind(path = "/", filepath = "", classes = []) { this.app.get(path, async (req, res) => {