Thank you for your reply,I understand what you mean,and I am very much in favor.
NodeBB has a good experience on the web side.
I prefer to know how to fix it because most people in my place prefer a client and they think it is convenient.😞
hey, how exactly is the staticDirs
within plugin.json implemented?
Is it somehow possible to add a directory and dynamically add its files later, but as soon as they're available they should be accessible...
That should be how it works right now. The staticDirs
property maps an alias (the object key) to the actual system path.
For example:
staticDirs: {
"foo": "bar"
}
... will map the route 127.0.0.1:4567/plugins/nodebb-theme-myplugin/foo
to /path/to/nodebb/node_modules/nodebb-theme-myplugin/bar
I believe I used express.static
to route the directory, so any files added in after NodeBB has started should still be routed, since the parent directory was the one that was mounted.