I am trying to require a file and afterwards pass it to a var. I am following this tutorial to create a authentication system. After writing the server.js file and trying to
I've faced to something like this too. in your routes file , export the function as an object like this :
module.exports = { hbd: handlebar }
and in your app file , you can have access to the function by .hbd and there is no ptoblem ....!