StaticcreateCreates an ApplicationBuilder with in-memory defaults for development.
Automatically registers:
The Awilix DI container to use
ApplicationBuilder with defaults configured
StaticcreateCreates an ApplicationBuilder optimized for testing.
Similar to createWithDefaults but with test-specific configuration:
The Awilix DI container to use
ApplicationBuilder configured for testing
import { createContainer, ApplicationBuilderHelpers } from '@stratix/runtime';
describe('My Integration Tests', () => {
let app: Application;
beforeEach(async () => {
const container = createContainer();
app = await ApplicationBuilderHelpers.createForTesting(container)
.useContext(new MyModule())
.build();
await app.start();
});
afterEach(async () => {
await app.stop();
});
});
Helper functions for creating ApplicationBuilder instances with sensible defaults.
These helpers reduce boilerplate when setting up applications, especially for development and testing scenarios.
Example