# pkm_elf_cdn

Static-file CDN for the Pokemon Elf Unity client. Serves:
- `res/-1/debug/config/*.json` — version config (URLs, multiLanguage, server list)
- `res/-1/debug/back/*.9` — back resource bundles (assets)
- `res/-1/debug/force/*.9` — force resource bundles (assets)
- `res/-1/debug/apk/*.apk` — APK builds for self-update

## Deploy na VPS

```bash
git clone git@gitlab.com:poke_elf/pkm_elf_cdn.git
cd pkm_elf_cdn
# Serve on port 9225 (matches client's expected URL)
nohup python3 -m http.server 9225 > cdn.out 2>&1 &
```

## Antes de servir, ajuste o IP no version_config

Edite `res/-1/debug/config/version_config.json`:
- Substitua todos os `127.0.0.1` pelo IP da VPS
- Especialmente `loginUrl`, `cdnUrl`, `appUrl`, `forceResUrl`, `backResUrl`, `serverListUrl`

## Verificar

```bash
curl http://localhost:9225/res/-1/debug/config/version_config.json | head -20
```

Deve retornar o JSON com `language: "portuguese"` e portas localhost.
