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 :dog2:
Hello it's me :seedling:
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 :dog2: