DronaHQ interview question

how you can create a middleware?