PureCode Software interview question

How does Express.js handle routing and middleware execution?