Use web artifact publish path

This commit is contained in:
hwhung
2026-05-07 18:27:58 +08:00
parent 63a5db2a86
commit d7a2d520b6
5 changed files with 46 additions and 34 deletions
+9 -9
View File
@@ -18,10 +18,10 @@ The `.replit` `onBoot` command installs dependencies with:
pnpm install --ignore-workspace
```
For publishing from a workspace that clones this repo into `./random-proxy-simple`, configure the
workspace root `.replit` `[deployment]` block to build and run `random-proxy-simple` directly.
Keep `PORT`, `PROXY_API_KEY`, and `NODE_ENV` in the production `run` command. Do not use artifact
production deployment for this proxy. Use `pnpm build:fast` for Replit publish builds.
For publishing from a workspace that clones this repo into `./random-proxy-simple`, create a
`kind = "web"` artifact and point its production build/run commands at this proxy. Do not publish
this proxy as a `kind = "api"` artifact and do not rely on root `.replit` deployment settings.
Use `pnpm build:fast` for Replit publish builds.
## Install
@@ -36,7 +36,7 @@ Use the available `pnpm`. This repo intentionally has no `packageManager` pin.
## Start
```bash
pnpm dev
node build.mjs && PORT=${PORT:-3001} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} node --enable-source-maps dist/index.mjs
```
When Replit AI Integrations are provisioned, the app reads these variables automatically:
@@ -61,7 +61,7 @@ Use Replit AI Integrations endpoints only. Never use public official provider en
## Defaults
- host: `0.0.0.0`
- port: `3000`
- port: `3001`
- bearer token: `dev-proxy-key`
These can be overridden with CLI flags or environment variables:
@@ -76,9 +76,9 @@ Integration provider values are read from the `AI_INTEGRATIONS_*` environment va
## Verify
```bash
curl -s http://localhost:3000/api/healthz
curl -s http://localhost:3000/dashboard | head
curl -s -H "Authorization: Bearer ${PROXY_API_KEY:-dev-proxy-key}" http://localhost:3000/v1/models
curl -s http://localhost:3001/api/healthz
curl -s http://localhost:3001/dashboard | head
curl -s -H "Authorization: Bearer ${PROXY_API_KEY:-dev-proxy-key}" http://localhost:3001/v1/models
```
Expected without provider flags: dashboard, health, and model list work; chat completions return `503`.