File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,13 @@ same time.
6565 by the node script. The node helper and module script can communicate with
6666 each other using an integrated socket system.
6767- ** modulename/public** - Any files in this folder can be accessed via the
68- browser on ` /modulename/filename.ext ` .
68+ browser on ` /modulename/filename.ext ` . ** Note:** This requires the module to
69+ have a ` node_helper.js ` file. If your module doesn't need a node helper for
70+ anything else, an empty stub is enough:
71+ ``` js
72+ const NodeHelper = require (" node_helper" );
73+ module .exports = NodeHelper .create ({});
74+ ```
6975- ** modulename/anyfileorfolder** Any other file or folder in the module folder
7076 can be used by the core module script. For example:
7177 _ modulename/css/modulename.css_ would be a good path for your additional
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ created:
5757this .expressApp .use (" /" + this .name , express .static (this .path + " /public" ));
5858```
5959
60+ This means files in the ` public ` folder are only served if the module has a
61+ ` node_helper.js ` . See also the
62+ [ module structure] ( introduction.md#files ) documentation.
63+
6064### ` this.io `
6165
6266** Socket IO Instance**
You can’t perform that action at this time.
0 commit comments