I need custom middle ware in express with routes with promise to perform specific task. Below is the sample code that would neededenter code here:

```
   function middle(){
   // some code;
   }
   app.get('/', middle, function (req, res) {
      console.log('url is working');
      res.send("Chat server is working!");
   });

```