Move api require back, dont export app
use req to get access to app instead of require