Capgemini interview question

how to execute middleware in a code