0

I have an NodeJS/Express app with several route files in /routes folder. I would like to be able to call a function on a server side i.e. myfunction.js from any of route files. What is the best way to set it up. As of now, i have myfunction.js duplicated in each of route files.

goryef
  • 1,337
  • 3
  • 22
  • 37

0 Answers0