Initial proxy artifact
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Proxy Artifact
|
||||
|
||||
Standalone TypeScript API proxy packaged as a Replit `kind = "web"` artifact.
|
||||
|
||||
## Replit
|
||||
|
||||
The repo includes:
|
||||
|
||||
- `.replit` for the Run button
|
||||
- `.replit-artifact/artifact.toml` for Replit Publish
|
||||
|
||||
Run command:
|
||||
|
||||
```bash
|
||||
PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} pnpm prod
|
||||
```
|
||||
|
||||
Production publish build:
|
||||
|
||||
```bash
|
||||
pnpm install --ignore-workspace && pnpm build:fast
|
||||
```
|
||||
|
||||
Production publish run:
|
||||
|
||||
```bash
|
||||
PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} NODE_ENV=production node --enable-source-maps dist/index.mjs
|
||||
```
|
||||
|
||||
## Config
|
||||
|
||||
The app reads Replit AI Integration variables automatically:
|
||||
|
||||
- `AI_INTEGRATIONS_OPENAI_BASE_URL`
|
||||
- `AI_INTEGRATIONS_OPENAI_API_KEY`
|
||||
- `AI_INTEGRATIONS_ANTHROPIC_BASE_URL`
|
||||
- `AI_INTEGRATIONS_ANTHROPIC_API_KEY`
|
||||
|
||||
Server/proxy overrides:
|
||||
|
||||
- `HOST`
|
||||
- `PORT`
|
||||
- `PROXY_API_KEY`
|
||||
|
||||
CLI flags still work for manual runs, but mass deployments should use environment variables.
|
||||
|
||||
## Commands
|
||||
|
||||
- `pnpm install --ignore-workspace`
|
||||
- `pnpm prod`
|
||||
- `pnpm run build:fast`
|
||||
- `pnpm run build`
|
||||
- `pnpm run typecheck`
|
||||
Reference in New Issue
Block a user