You are wrapping everything in an IIFE (immediately-invoked function expression) and exporting that IIFE into your index.js.
IIFEs are great for privacy in the frontend, but not necessary here. When exporting/requiring modules, anything that's left behind is automatically private.
Think of it as locking your code in a vault, then putting your vault in another vault, then dropping that vault in the sea with a ball-and-chain attached, before adding another vault. Overkill. :wink:
Let's take handler.js for example.
You are wrapping everything in an IIFE (immediately-invoked function expression) and exporting that IIFE into your index.js.
IIFEs are great for privacy in the frontend, but not necessary here. When exporting/requiring modules, anything that's left behind is automatically private.
Think of it as locking your code in a vault, then putting your vault in another vault, then dropping that vault in the sea with a ball-and-chain attached, before adding another vault. Overkill. :wink: