-
-
Save ozzyr/8699c992e7f6dde03bd9ce33c32dc599 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
module.exports = app => { | |
fs | |
.readdirSync(__dirname) | |
.filter(file => ((file.indexOf('.')) !== 0 && (file !== "index.js"))) | |
.forEach(file => require(path.resolve(__dirname, file))(app)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment