Restore working Replit setup prompt

This commit is contained in:
hwhung
2026-05-07 18:57:11 +08:00
parent d7a2d520b6
commit 4ef4925fb6
5 changed files with 23 additions and 49 deletions
+8 -9
View File
@@ -18,10 +18,9 @@ The `.replit` `onBoot` command installs dependencies with:
pnpm install --ignore-workspace
```
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.
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, then
create a shell web artifact so the publish UI has a web target.
## Install
@@ -36,7 +35,7 @@ Use the available `pnpm`. This repo intentionally has no `packageManager` pin.
## Start
```bash
node build.mjs && PORT=${PORT:-3001} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} node --enable-source-maps dist/index.mjs
pnpm dev
```
When Replit AI Integrations are provisioned, the app reads these variables automatically:
@@ -61,7 +60,7 @@ Use Replit AI Integrations endpoints only. Never use public official provider en
## Defaults
- host: `0.0.0.0`
- port: `3001`
- port: `3000`
- bearer token: `dev-proxy-key`
These can be overridden with CLI flags or environment variables:
@@ -76,9 +75,9 @@ Integration provider values are read from the `AI_INTEGRATIONS_*` environment va
## Verify
```bash
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
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
```
Expected without provider flags: dashboard, health, and model list work; chat completions return `503`.