Skip to main content

Application

Ditsmod allows you to write applications using different architectural styles:

Ditsmod provides an API that allows you to add support for the required architecture. Such packages are more than just regular feature modules, since they also include application classes that define their own application configuration, their own application build sequence, and so on. As a rule, each of these packages has its own specifics regarding feature modules.

An instance of the application class is typically created in the main.ts file, and the application starts working from there. For example, an instance of a REST application class is created as follows:

src/main.ts
import { RestApplication } from '@ditsmod/rest';
import { AppModule } from './app/app.module.js';

const app = await RestApplication.create(AppModule);
app.server.listen(3000, '0.0.0.0');