Methods
# loadEntitiesModules (folderPath: string, depthopt: number) inner
Load all *.js for which pair *.meta is exists
# loadLegacyModules (folderPath: string, isFromPublicFolder: boolean, depth: number) inner
For UB < 4.2 compatibility - require all non - entity js
in specified folder add its sub-folder (one level depth),
exclude modules
and node_modules
sub-folder's.
From 'public' sub-folder only cs*.js are required.
To be called in model index.js as such:
const modelLoader = require('@unitybase/ub').modelLoader
For new models we recommend to require non-entity modules manually
# loadServerLocale (modelPath: string) inner
Load serverLocale/*-??.json for each language code (??) supported by application
Arguments:
modelPath
: string