How to properly access the app variable set by express in a node.js app?

I'm building a node.js server and my folder structure looks like this:

server.js

app/routes.js

app/routes/users.js

My problem is that i'm not sure how can i use the

app

variable inside the users.js file. Do i have to require and setup express again in this file or is there a better/easier way to do it? Here is my sample code(just the bare minimum to understand my problem):

In your .memberInfo method, you can use req.app to access the app object that is associated with that request.

In cases where you aren't passed a req object that you can use in this way, then you need to initialize the module by calling a method on it and passing it the app object and the module can then store the app object locally so it can use it when desired.