Changed app.require to return exported module.