I'm using express and am using an arrow function to handle my req,res params. I'm delegating this req,res to another helper function though.
I.e.
app.get("/Model/:id", (req, res) => { Handler.model(req, res) });
My question is if I can avoid that redundancy and just do something like
app.get("/Model/:id", Handler.model(req, res));
app.get("/Model/:id", Handler.model);. Read this article to learn more about the difference of passing things by reference/value: javascripttutorial.net/javascript-pass-by-valueapp.get(can cause issue. Better you should not always delegate.