artu-hnrq / learnlog

0 stars 0 forks source link

node.js require all files in a folder? #78

Open artu-hnrq opened 1 year ago

artu-hnrq commented 1 year ago

Using a index.js file (witch is imported by default when the folder path is passed as param to the require function), one can export everything wanted from the whole module folder

https://stackoverflow.com/questions/5364928/node-js-require-all-files-in-a-folder