support new way to load api routes

this is from @contra