Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exporting multiable files from one folder #13

Open
abdhalees opened this issue Dec 17, 2017 · 0 comments
Open

exporting multiable files from one folder #13

abdhalees opened this issue Dec 17, 2017 · 0 comments

Comments

@abdhalees
Copy link

I like that you're splitting your functions into files, but if you have lots of functions used in another file you'll have to require each function and that's lots of lines.
You could add an index.js file in your folder and export from it and only require this file in your handler.

index.js will be something like this:

module.exports = {
insert: require('./insert.js'),
showData: require:('selectAll.js')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant