Reusable server connect function in node js

I have multiple apis created in server connect. In these apis there is a common function which fetches data from table based on different id. This id will be different in each apis, so I want the function to accept the id as an argument and perform necessary actions.
Is there any feature like this ?

Community Page
Last updated: