Issue #4788 - ESM Module Example
It's getting incredibly late here, but I mocked up a quick example that demonstrates how to use express via an ESM module. I've been using ECMA modules for a little while now, and can include a much more complex example upon request. There's a bit of power using modules vs. the CommonJS approach. Imho, as an example, it's a bit easier to add middleware. There's a lot of ease, too, when using async.
However, express@^5 is required. I believe this has to do with the impressive compatibility express has kept with the various node versions.
Whoops, I forgot to mention Issue #4788. I'll include a link back to this there, too.
Note -- this was ran on the latest LTS version of Node.js.