fix: top level await in node middleware (#76012)
### What?
Using top level await with a node middleware will crash with `adapterFn`
is not a function
### Why?
When using top level await requiring `middleware.js` will return a
promise that need to be awaited
### How?
Await the require and changed `getMiddleware` signature
Co-authored-by: JJ Kasper <jj@jjsweb.site>