This is a template for express server.
-
Separate Model and Route
-
Auto generate url path and easy to inject middleware
-
Integrate
sequelize -
Support Hot Swapping for developing. You don't need to restart the whole server when updating
RouteandModel
-
Hot swapping currently only support
RouteandModel, includingchange,createanddeletefiles. Hot swapping of definition of tables are not supported yet. -
For modules those require in
RouteandModeland only export an Object, you could usewatchRequireto enable hot swapping for the module. Otherwise the loader would not trace the updating of the required module. -
The
requirefunction is mocked so that you could require module with path relative to thesrcdirectory of the project by using~prefix, relative to therootdirectory by using@prefix, so doeswatchRequire