You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A small thing but a good thing to think about at this point as projects get bigger...
You'll see that, like all groups, your handler.js file is getting fairly massive. A good way to think about restructuring and modularising this is using a handlers directory and an index.js file. You can then break up each handler into its own .js file, export each one, and import them into your index.js file in the handlers directory (and also have them exporting out of there). Then, when you want to call upon all those handlers, you'll just have to direct your router to the handlers directory and it'll automatically look for an index.js file 🐕
The text was updated successfully, but these errors were encountered:
Hello it's me 🌱
A small thing but a good thing to think about at this point as projects get bigger...
You'll see that, like all groups, your
handler.js
file is getting fairly massive. A good way to think about restructuring and modularising this is using ahandlers
directory and anindex.js
file. You can then break up each handler into its own.js
file, export each one, and import them into yourindex.js
file in thehandlers
directory (and also have them exporting out of there). Then, when you want to call upon all those handlers, you'll just have to direct your router to thehandlers
directory and it'll automatically look for anindex.js
file 🐕The text was updated successfully, but these errors were encountered: