import { Module } from '@nestjs/common';
import { StaticFileService } from './static-file.service';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
@Module({
  imports: [
    ServeStaticModule.forRoot({
      rootPath: join(process.cwd(), 'uploads'), // Points to root/uploads
      serveRoot: '/uploads',
      serveStaticOptions: {
        index: false,
      },
    }),
  ],
  providers: [StaticFileService],
  exports: [StaticFileService],
})
export class StaticFileModule {}
