Mod loading order
Startup
- Search for mods
- For each mod (sorted alphabetically by mod file name):
- .js mods
- Initialize mod, and add mod along with mod info to list
- .tar.gz mods
- Prepare temporary directory for extracted mod contents
- Extract mod contents
- Initialize mod, and add mod along with mod info to list
- .js mods
- Load server-side JavaScript:
- Create mod file from server-side JavaScript
- Initialize “mod”, and add “mod” to list
Execution (on each server request)
- Initialize SVR.JS variables
- Invoke mods and server-side JavaScript (mods sorted alphabetically by mod file name)
- Load SVR.JS main callback (if it’s not affected by mods and server-side JavaScript)