Add function to convert restify middleware to express middleware