1
Fork 0

typescript(translucid): fixed res path of public

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-01-20 13:13:08 +02:00 committed by prescientmoon
parent 933e964ff0
commit 23dd6e580d
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4

View file

@ -18,7 +18,7 @@ class Translucid {
this.midleware.push(obj);
}
public(path = "") {
this.app.use(`/${path}`, express.static(`/${path}`));
this.app.use(`/${path}`, express.static(`${__dirname}/../../${path}`));
}
bind(path = "/", filepath = "", classes = []) {
this.app.get(path, async (req, res) => {