Skip to main content

Server (@foundry/server)

The Express server runs with tsx (no bundler) and connects to Supabase using a service role key.

Key Files

FilePurpose
src/index.tsApp entry: middleware, routes, error handling
src/routes/health.tsHealth check endpoint
src/lib/supabase.tsSupabase client (service role)

Adding Routes

  1. Create a route file in src/routes/
  2. Export a Router
  3. Register in src/index.ts

Development

pnpm dev --filter=@foundry/server  # Starts with tsx watch