O Language/Advanced/Modules
From OnixOS
Modules and Loading
Modules use the .olm extension. A module can define functions and values that become available to the program that loads it.
load "helpers.olm"
The path is resolved from the current project directory. Keep shared definitions in modules instead of repeating them in every entry point.
Web project loading
Web projects use one central loader:
load "lib/loader.olm"
boot.ola loads lib/loader.olm. The loader loads controllers, models, connections, libraries, and finally config/config.ola. Controllers must be loaded before the route configuration because route responses refer to handler functions.
When the web CLI creates or adds a project component, it updates the loader automatically. This keeps the boot process in one place.
