import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { PalmOilModule } from './palm-oil/palm-oil.module';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'sqljs',
      location: 'palm_history.db',
      autoSave: true,
      useLocalForage: false,
      autoLoadEntities: true,
      synchronize: true,
    }),
    PalmOilModule,
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
