From 57b52f72d3bc1fecf9feb66ebbe1eca119e9b6a5 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Sat, 19 Jan 2019 23:34:32 +0200 Subject: [PATCH] typescript(translucid): fixed middleware typo Signed-off-by: prescientmoon --- typescript/translucid/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/typescript/translucid/README.md b/typescript/translucid/README.md index 3df9376..6aba50f 100644 --- a/typescript/translucid/README.md +++ b/typescript/translucid/README.md @@ -30,17 +30,17 @@ connect.then(() => { ``` The translucid object can be used to make file bindings: ``` -translucid.bind("/","client/index.html",true//use midleware,["myId"]); +translucid.bind("/","client/index.html",true,["myId"]); ``` -Then you can add midleware like this: +Then you can add middleware like this: ``` translucid.use({ - name:"my midleware", + name:"my middleware", keys:["myid"], run:(prev,req,res,next) => { //prev is the data that is going to be sent to the client //(it might for example be the index.html file); - next(prev+"string added by a midleware"); + next(`${prev}
string added by a middleware`); } }); ```