express middleware of the xAPI