60 lines
1.7 KiB
Markdown
60 lines
1.7 KiB
Markdown
# Workspace
|
|
|
|
## Overview
|
|
|
|
Standalone TypeScript API server with Replit run and deployment configuration.
|
|
|
|
## Stack
|
|
|
|
- **Node.js version**: 24
|
|
- **Package manager**: pnpm
|
|
- **TypeScript version**: 5.9
|
|
- **API framework**: Express 5
|
|
- **Build**: esbuild
|
|
|
|
## Provider Endpoints
|
|
|
|
Use Replit AI Integrations endpoints. The app reads these environment variables automatically:
|
|
|
|
- `AI_INTEGRATIONS_OPENAI_BASE_URL`
|
|
- `AI_INTEGRATIONS_OPENAI_API_KEY`
|
|
- `AI_INTEGRATIONS_ANTHROPIC_BASE_URL`
|
|
- `AI_INTEGRATIONS_ANTHROPIC_API_KEY`
|
|
|
|
CLI flags are still available for manual overrides:
|
|
|
|
- `--openai-base-url`
|
|
- `--openai-api-key`
|
|
- `--anthropic-base-url`
|
|
- `--anthropic-api-key`
|
|
|
|
Never use public official provider endpoints.
|
|
|
|
## Key Commands
|
|
|
|
- `pnpm install --ignore-workspace` — install dependencies without joining a parent workspace
|
|
- `node build.mjs && node --enable-source-maps dist/index.mjs` — build and run API server locally on port `3000`
|
|
- `pnpm run typecheck` — typecheck the server
|
|
- `pnpm run build` — typecheck and build `dist/index.mjs`
|
|
- `pnpm run build:fast` — build `dist/index.mjs` without typechecking
|
|
- `pnpm start` — run the built server
|
|
|
|
## Replit Configuration
|
|
|
|
- `.replit` `run` builds with `node build.mjs` and runs `dist/index.mjs`
|
|
- `.replit` `onBoot` uses `pnpm install --ignore-workspace`
|
|
- publishing from a parent workspace should configure root `.replit` deployment and create a shell web artifact
|
|
|
|
## Server Overrides
|
|
|
|
- `--host` or `HOST`
|
|
- `--port` or `PORT`
|
|
- `--proxy-api-key` or `PROXY_API_KEY`
|
|
|
|
## Routes
|
|
|
|
- `/` and `/dashboard` — static model dashboard
|
|
- `/api/healthz` — health check
|
|
- `/v1/models` — OpenAI-compatible model list
|
|
- `/v1/chat/completions` — OpenAI-compatible chat proxy
|