chore: migrate backend to monorepo apps and biome

This commit is contained in:
2026-04-03 18:04:59 +03:00
parent 33ca299632
commit 6032451b17
52 changed files with 956 additions and 1198 deletions

View File

@@ -0,0 +1,8 @@
import { NestFactory } from '@nestjs/core';
import { NotificationsModule } from './notifications.module';
async function bootstrap() {
const app = await NestFactory.create(NotificationsModule);
await app.listen(process.env.NOTIFICATIONS_PORT ?? 3003);
}
bootstrap();

View File

@@ -0,0 +1,22 @@
import { Test, TestingModule } from '@nestjs/testing';
import { NotificationsController } from './notifications.controller';
import { NotificationsService } from './notifications.service';
describe('NotificationsController', () => {
let notificationsController: NotificationsController;
beforeEach(async () => {
const app: TestingModule = await Test.createTestingModule({
controllers: [NotificationsController],
providers: [NotificationsService],
}).compile();
notificationsController = app.get<NotificationsController>(NotificationsController);
});
describe('root', () => {
it('should return "Hello World!"', () => {
expect(notificationsController.getHello()).toBe('Hello World!');
});
});
});

View File

@@ -0,0 +1,12 @@
import { Controller, Get } from '@nestjs/common';
import { NotificationsService } from './notifications.service';
@Controller()
export class NotificationsController {
constructor(private readonly notificationsService: NotificationsService) {}
@Get()
getHello(): string {
return this.notificationsService.getHello();
}
}

View File

@@ -0,0 +1,10 @@
import { Module } from '@nestjs/common';
import { NotificationsController } from './notifications.controller';
import { NotificationsService } from './notifications.service';
@Module({
imports: [],
controllers: [NotificationsController],
providers: [NotificationsService],
})
export class NotificationsModule {}

View File

@@ -0,0 +1,8 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class NotificationsService {
getHello(): string {
return 'Hello World!';
}
}