All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 31s
Shop module: GET /api/shop, POST /api/shop/buy/:id, POST /api/shop/sell/:id Potions: achat instantané, heal 50% HP, pas d'inventaire. Items: buyPrice + minLevel + zone ajoutés à l'entité. 12 équipements (4 par zone: marais/égouts/désert) + 2 potions. Monstres: zone field ajouté, 10 nouveaux monstres: Égouts (lv4-10): Rat, Slime, Araignée, Crocodile, Roi des Rats Désert (lv8-15): Scorpion, Vautour, Momie, Ver des Sables, Sphinx Frontend: page /shop groupée par zone, rarity colors, achat/vente. Sidebar: icône ShoppingBag pour la boutique.
68 lines
2.2 KiB
TypeScript
68 lines
2.2 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
import { ThrottlerModule } from '@nestjs/throttler';
|
|
import { EventEmitterModule } from '@nestjs/event-emitter';
|
|
import { AuthModule } from './auth/auth.module';
|
|
import { CharacterModule } from './character/character.module';
|
|
import { MonsterModule } from './monster/monster.module';
|
|
import { CombatModule } from './combat/combat.module';
|
|
import { ItemModule } from './item/item.module';
|
|
import { MaterialModule } from './material/material.module';
|
|
import { CraftModule } from './craft/craft.module';
|
|
import { ForgeModule } from './forge/forge.module';
|
|
import { EconomyModule } from './economy/economy.module';
|
|
import { TwitchModule } from './twitch/twitch.module';
|
|
import { AchievementModule } from './achievement/achievement.module';
|
|
import { CommunityModule } from './community/community.module';
|
|
import { HallOfFameModule } from './halloffame/halloffame.module';
|
|
import { ProfileModule } from './profile/profile.module';
|
|
import { QuestModule } from './quest/quest.module';
|
|
import { ShopModule } from './shop/shop.module';
|
|
import { HealthController } from './common/health.controller';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({ isGlobal: true }),
|
|
EventEmitterModule.forRoot(),
|
|
|
|
TypeOrmModule.forRootAsync({
|
|
imports: [ConfigModule],
|
|
inject: [ConfigService],
|
|
useFactory: (config: ConfigService) => ({
|
|
type: 'mysql',
|
|
url: config.get<string>('DATABASE_URL'),
|
|
autoLoadEntities: true,
|
|
synchronize: config.get('DB_SYNC') === 'true' || config.get('NODE_ENV') !== 'production',
|
|
logging: config.get('NODE_ENV') === 'development',
|
|
}),
|
|
}),
|
|
|
|
ThrottlerModule.forRoot([
|
|
{
|
|
ttl: 60_000,
|
|
limit: 20,
|
|
},
|
|
]),
|
|
|
|
AuthModule,
|
|
CharacterModule,
|
|
MonsterModule,
|
|
CombatModule,
|
|
ItemModule,
|
|
MaterialModule,
|
|
CraftModule,
|
|
ForgeModule,
|
|
EconomyModule,
|
|
TwitchModule,
|
|
AchievementModule,
|
|
CommunityModule,
|
|
HallOfFameModule,
|
|
ProfileModule,
|
|
QuestModule,
|
|
ShopModule,
|
|
],
|
|
controllers: [HealthController],
|
|
})
|
|
export class AppModule {}
|