import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
import { PrismaService } from './services/prisma.service';
import { AppGetaway } from './app.getaway';
import { StatsController } from './stats.controller';
import { StatsService } from './services/stats.service';

@Module({
  imports: [
    ServeStaticModule.forRoot(
      {
        rootPath: join(__dirname, 'assets/client'),
        renderPath: '/'
      },
      {
        rootPath: join(__dirname, 'assets/uploads'),
        serveRoot: '/uploads',
      }),
  ],
  controllers: [AppController, StatsController],
  providers: [PrismaService, StatsService, AppGetaway],
})
export class AppModule { }
