- move NestJS app into server/ subdirectory - add client/ React+TypeScript (Vite) app with Hello World - update docker-compose to build and run both services - add root package.json declaring npm workspaces - update .gitignore to cover node_modules and dist at all depths
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
import { Module } from "@nestjs/common";
|
|
import { ConfigModule, ConfigService } from "@nestjs/config";
|
|
import { AppConfig, validateAppConfig } from "./config/app.config";
|
|
import { TypeOrmModule } from "@nestjs/typeorm";
|
|
import { ScheduleModule } from "@nestjs/schedule";
|
|
import { HealthModule } from "./health/health.module";
|
|
import { AuthModule } from "./auth/auth.module";
|
|
import { BrowserModule } from "./browser/browser.module";
|
|
import { SessionEntity } from "./session/session.entity";
|
|
import { EnvironmentEntity } from "./environment/environment.entity";
|
|
import { EnvironmentModule } from "./environment/environment.module";
|
|
import { McpModule } from "./mcp/mcp.module";
|
|
import { ScenarioEntity } from "./scenario/scenario.entity";
|
|
import { ScenarioStepEntity } from "./scenario/scenario-step.entity";
|
|
import { ScenarioRunEntity } from "./scenario/scenario-run.entity";
|
|
import { ScenarioRunStepEntity } from "./scenario/scenario-run-step.entity";
|
|
import { ScenarioRunLogEntity } from "./scenario/scenario-run-log.entity";
|
|
import { ScenarioModule } from "./scenario/scenario.module";
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
envFilePath: ".env",
|
|
validate: validateAppConfig,
|
|
}),
|
|
ScheduleModule.forRoot(),
|
|
TypeOrmModule.forRootAsync({
|
|
inject: [ConfigService],
|
|
useFactory: (config: ConfigService<AppConfig, true>) => ({
|
|
type: "better-sqlite3",
|
|
database: config.get("DB_PATH"),
|
|
entities: [
|
|
SessionEntity,
|
|
EnvironmentEntity,
|
|
ScenarioEntity,
|
|
ScenarioStepEntity,
|
|
ScenarioRunEntity,
|
|
ScenarioRunStepEntity,
|
|
ScenarioRunLogEntity,
|
|
],
|
|
synchronize: true,
|
|
}),
|
|
}),
|
|
AuthModule,
|
|
BrowserModule,
|
|
EnvironmentModule,
|
|
ScenarioModule,
|
|
McpModule,
|
|
HealthModule,
|
|
],
|
|
})
|
|
export class AppModule {}
|