Store
all of variable that need for application saved into store.ts
in root path, here is a overview of store type:
Name | Type | Description | Default |
---|---|---|---|
env | StoreEnv | load all environment variables front env files, parse and combine some of them | |
db | mongoose | instance of mongoose connection | MongooseConnection |
dirs | string[] | list of all root dirs that usage core modules | [root path ] |
server | Server | instance of express server | Server |
app | Application | instance of express application | Application |
seo | Seo | instance of Seo abstraction class | CoreSeo |
supervisor | SupervisorEmitter | instance of SupervisorEmitter which emit submit events into declared supervisor | undefined |
globalMiddleware | {error: ErrorPackageFn ; pipes : { [key: string]: Pipe<unknown> } } | global middleware that apply into all requests | { pipes: {}, error: {} } |
systemLogger | Logger | logger interface which handle all application logs,errors,warns, etc. | CoreLogger |
adminViews | { [key: AdminViewSchema['name']]: AdminViewSchema['content'] } | store admin views configs and rules which parse in Nodeeweb Admin | {} |
templates | { [key: string]: StoreTemplate } | application templates store here with key of template type | {} |
routes | { [k: string]: StoreRoute } | application routes which parse in Nodeeweb Front | {} |
strategies | Map<string, AuthStrategy> | store AuthStrategy of application with key of id | new Map() |
plugins | PluginCore | application plugins | new PluginCore() |
config | ConfigType | application config which save on ./shared/config.json | CoreConfig |
event | EventEmitter | application event emitter | new EventEmitter() |
fixedHandlers | any[] | express fixed handlers | [] |
systemNotif | SystemNotif[] | application system notification which alert admin after trigger | [] |