jaysylvester / citizen

Node.js MVC web application framework. Includes routing, serving, caching, session management, and other helpful tools.
MIT License
100 stars 7 forks source link

Watch for new modules and add them without requiring an app restart #128

Open jaysylvester opened 3 months ago

jaysylvester commented 3 months ago

HMR works well for modules that exist at startup, but when adding a new route controller, model, and views during development, the app has to be restarted to import them into the app scope and make them available to the framework. Import them dynamically upon creation instead so they're available without restarting.