Trying to serve individual endpoints as middleware