fix(dev): cards-server uses --hot + setup-databases creates mana_notify/credits

cards-server: switch from `bun run --watch` to `bun run --hot`.
--watch restarts the whole process on file change, racing the
old + new Bun.serve calls for the port (the EADDRINUSE you see
right after `listening on :3072`). --hot does in-process HMR via
the globalThis[hmrSymbol] pattern; the port stays bound across
reloads. apps/api already uses --hot for the same reason.

scripts/setup-databases.sh:
- create_db_if_not_exists "mana_notify" + "mana_credits" so a
  fresh-machine `pnpm setup:db` no longer leaves these two DBs
  off (mana-notify was crashing on boot with SASL fallback,
  mana-credits was less obvious because its drizzle config
  defaults to mana_platform — but the runtime config can point
  at mana_credits, so safer to have the DB exist).
- Fix the cards branch: was pointing at the non-existent
  @mana/cards-database package; now points at @mana/cards-server
  where the actual schema lives.

Verified: drop+re-create flow + cardecky:full boot + touch-trigger
hot-reload all clean.
This commit is contained in:
Till JS 2026-05-08 14:10:55 +02:00
parent 61f2772789
commit 08f4223404
3 changed files with 10 additions and 3 deletions

View file

@ -5,7 +5,7 @@
"type": "module",
"description": "Cards marketplace + community backend. Owns published decks, versions, subscriptions, forks, pull-requests, discussions, moderation, and the credits-based author payout pipeline.",
"scripts": {
"dev": "bun run --watch src/index.ts",
"dev": "bun run --hot src/index.ts",
"start": "bun run src/index.ts",
"type-check": "tsc --noEmit",
"db:push": "drizzle-kit push",