split the project in 2
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# tssbot backend
|
||||
|
||||
Rust backend API service for Toothless' TSS Bot.
|
||||
|
||||
It reads two SQLite databases:
|
||||
|
||||
- `TSS_BATTLES_DB` for `tss_battles.db`
|
||||
- `TSS_TEAMS_DB` for `tss_teams.db`
|
||||
|
||||
Both paths can be absolute or relative to the repo root when run through the root scripts/PM2.
|
||||
|
||||
It currently exposes:
|
||||
|
||||
- `GET /health`
|
||||
- `GET /api/tss/leaderboard/teams?limit=100`
|
||||
- `GET /api/tss/teams/resolve?name=...`
|
||||
- `GET /api/tss/teams/search?q=...&limit=10`
|
||||
- `GET /api/tss/teams/:team`
|
||||
- `GET /api/tss/teams/:team/history`
|
||||
- `GET /api/tss/teams/:team/games`
|
||||
|
||||
## Local development
|
||||
|
||||
```sh
|
||||
npm run dev:backend
|
||||
```
|
||||
|
||||
The backend listens on <http://localhost:6000> by default. Override with `BACKEND_PORT`.
|
||||
|
||||
## Production build
|
||||
|
||||
```sh
|
||||
npm run build:backend
|
||||
```
|
||||
Reference in New Issue
Block a user