1
Fork 0

typescript(translucid): logged

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-01-22 21:51:07 +02:00 committed by prescientmoon
parent 13fe6be102
commit c8bd42b769
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
2 changed files with 8 additions and 6 deletions

View file

@ -27,7 +27,7 @@ class Translucid {
const classes = object[i].classes || [];
this.bind(i, object[i].file, classes);
//gotta comment this later
console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`);
// console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`)
}
}
bind(path = "/", filepath = "", classes = []) {
@ -46,8 +46,9 @@ class Translucid {
toRun[i](prev, ...expressArgs, decorated[i + 1]);
});
}
decorated.push((prev) => {
res.contentType(`${__dirname}/../../${filepath}`);
decorated.push((prev, req, res) => {
console.log(`${__dirname}/../../${filepath}`);
// res.contentType(`${__dirname}/../../${filepath}`);
res.send(prev);
});
decorated[0](readResults);

View file

@ -32,7 +32,7 @@ class Translucid {
const classes = object[i].classes || [];
this.bind(i,object[i].file,classes);
//gotta comment this later
console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`)
// console.log(`Binded room with name ${i} and path ${object[i].file} with classes ${classes}`)
}
}
bind(path:string = "/", filepath:string = "", classes:Array<string> = []):void{
@ -54,8 +54,9 @@ class Translucid {
toRun[i](prev, ...expressArgs, decorated[i + 1]);
});
}
decorated.push((prev:any):void => {
res.contentType(`${__dirname}/../../${filepath}`);
decorated.push((prev:any,req,res):void => {
console.log(`${__dirname}/../../${filepath}`);
// res.contentType(`${__dirname}/../../${filepath}`);
res.send(prev);
});