StaticcreateCreate a ServiceBase instance with simple configuration
Optionalsimple: SimpleBSBOptionsSimple configuration options
New ServiceBase instance
StaticfromCreate a ServiceBase instance from a preset
Preset configuration type
Optionaloverrides: Partial<BSBOptions>Additional options to override preset defaults
New ServiceBase instance
StaticminimalCreate a minimal ServiceBase instance for quick prototyping
Optionalcwd: stringWorking directory (defaults to process.cwd())
New ServiceBase instance with minimal configuration
StaticdevelopmentCreate a development ServiceBase instance with debug logging
Optionalcwd: stringWorking directory (defaults to process.cwd())
New ServiceBase instance configured for development
StaticproductionCreate a production ServiceBase instance with optimized settings
Optionalcwd: stringWorking directory (defaults to process.cwd())
New ServiceBase instance configured for production
Dispose all subsystems and exit process with code
OptionalextraData: anyAdd a service plugin programmatically
Main entry point for the BSB framework.
This class is responsible for initializing and running the BSB framework. You can override the default behaviour of the framework by passing in your own classes for the plugins, logging, metrics, events and services. The passed in classes are not the plugins themselves, but rather the classes that handle the plugin creation, setup and running.