logux/server

Add Server#autoloadModules

ai opened this issue · 2 comments

ai commented

This method should be in Server, not BaseServer. It should:

  1. Take this.options.root and load all modules/* files.
  2. Each module will have server => void signature.
kabbi commented

I think it's worth considering next.js filesystem-based routing experience, something like

.
|-- actions
|   `-- users
|       |-- add.js
|       `-- rename.js
`-- channels
    `-- users
        `-- [id].js

Maybe not in the core API though

ai commented

This issue already fixed in next branch with an option to override pattern.