typescript(translucid): fixed express static file path without __dirname
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
aea0646dc8
commit
96bc542e76
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue