mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
![]() The hostname:port of URIs used in Minify are currently bogus and refer to localhost only for historical reasons; there's no reason to retain them and omitting them avoids generating an invalid URI when "port" is not an integer. Context: settings.port is passed to express's listen; if not numeric, it is used a filename for a Unix domain socket. This allows e.g. starting a server to be reverse-proxied on a multi-user system, using the filesystem to handle access control and avoiding need to allocate port numbers. Before this change, etherpad-lite starts without error when configured to listen on a Unix domain socket in this manner. However, `pad.js` and `ace2_common.js` are generated incorrecting, causing an error "Uncaught Error: The module at "ep_etherpad-lite/static/js/rjquery" does not exist." when loading the editor: When settings.port is a non-numeric string, e.g. `etherpad.sock`, a URI of the form `http://localhost:etherpad.sock/static/js/rjquery.js` is generated and parsed to find the file needed. In this case, the file searched for is `:etherpad.sock/static/js/rjquery.js`, rather than the expected `static/js/rjquery.js`. No such file exists, and the required code is silently omitted from the bundle. As a workaround, hard-code a (meaningless) hostname which can be parsed correctly, since the current code makes no use of it anyway. |
||
---|---|---|
.. | ||
db | ||
eejs | ||
handler | ||
hooks | ||
utils | ||
easysync_tests.js | ||
padaccess.js | ||
README.md | ||
server.js | ||
stats.js |
About the folder structure
- db - all modules that are accesing the data structure and are communicating directly to the database
- handler - all modules that responds directly to requests/messages of the browser
- utils - helper modules
Module name conventions
Module file names start with a capital letter and uses camelCase
Where does it start?
server.js is started directly