1
Fork 0

typescript(translucid): public

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-01-20 13:02:48 +02:00 committed by prescientmoon
parent 09eccccf97
commit 5d08b794bf
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4

View file

@ -16,6 +16,9 @@ class Translucid {
use(obj) {
this.midleware.push(obj);
}
public(path = "") {
this.app.use(`${__dirname}/../../${path}`, express.static(`${__dirname}/../../${path}`));
}
bind(path = "/", filepath = "", classes = []) {
this.app.get(path, async (req, res) => {
const readResults = await read_1.read(filepath);