-
Notifications
You must be signed in to change notification settings - Fork 0
Registry
The registry is a simple static class that contains all registered modules and any other data that is needed to run the application. You can access the registry from anywhere in the application by importing and calling it's static methods.
The Registry is cut up into two main sections, the module registration area, and the static
variables area. The module registration area is where all engine modules get registered and
the variables area is where we store all the static variables that are needed to run the
application, like engine.mode
which is whether the app is running in production or development
based on the in-use file extension (.js = prod, .ts = dev).
Below is an example of calling the registry and getting the environment mode (dev/prod):
import { Registry } from '@symbux/turbo';
console.log(Registry.get('engine.mode'));
Below is an example of listing all modules and then retrieving the modules as a formatted array:
import { Registry } from '@symbux/turbo';
console.log(Registry.listModules());
- Controllers
- Middleware
- Autowire
- Plugins
- Tasks
- Fibres
- Authentication
- Registry
- Services
- Dependecy Injection
- Translations (i18n)
- Safe Quit
- Exception Handling
- Event Listener
- Custom Logger
- HTTP Plugin - Built-In
- WS Plugin - Built-In
- Discord Plugin - External
- Vite Plugin - External
- Inspect Plugin - External
- CLI Plugin - External
- Got an issue? Join our Discord
- Need your own plugin? Contact Me
- Have an idea? Let's Discuss
- Want to support me? Buy me a coffee