Skip to main content

Store

all of variable that need for application saved into store.ts in root path, here is a overview of store type:

NameTypeDescriptionDefault
envStoreEnvload all environment variables front env files, parse and combine some of them
dbmongooseinstance of mongoose connectionMongooseConnection
dirsstring[]list of all root dirs that usage core modules[root path]
serverServerinstance of express serverServer
appApplicationinstance of express applicationApplication
seoSeoinstance of Seo abstraction classCoreSeo
supervisorSupervisorEmitterinstance of SupervisorEmitter which emit submit events into declared supervisorundefined
globalMiddleware{error: ErrorPackageFn ; pipes : { [key: string]: Pipe<unknown> } }global middleware that apply into all requests{ pipes: {}, error: {} }
systemLoggerLoggerlogger 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{}
strategiesMap<string, AuthStrategy>store AuthStrategy of application with key of idnew Map()
pluginsPluginCoreapplication pluginsnew PluginCore()
configConfigTypeapplication config which save on ./shared/config.jsonCoreConfig
eventEventEmitterapplication event emitternew EventEmitter()
fixedHandlersany[]express fixed handlers[]
systemNotifSystemNotif[]application system notification which alert admin after trigger[]