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
Route
andModel
-
Hot swapping currently only support
Route
andModel
, includingchange
,create
anddelete
files. Hot swapping of definition of tables are not supported yet. -
For modules those require in
Route
andModel
and only export an Object, you could usewatchRequire
to enable hot swapping for the module. Otherwise the loader would not trace the updating of the required module. -
The
require
function is mocked so that you could require module with path relative to thesrc
directory of the project by using~
prefix, relative to theroot
directory by using@
prefix, so doeswatchRequire