Avoid dev command in Replit workflow
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
run = "pnpm dev"
|
run = "node build.mjs && PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} node --enable-source-maps dist/index.mjs"
|
||||||
onBoot = "pnpm install --ignore-workspace"
|
onBoot = "pnpm install --ignore-workspace"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Do not add this repo to a parent workspace. Do not move it into `artifacts/`. Do
|
|||||||
The repo includes `.replit`, so after import the Run button starts the app with:
|
The repo includes `.replit`, so after import the Run button starts the app with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm dev
|
node build.mjs && PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} node --enable-source-maps dist/index.mjs
|
||||||
```
|
```
|
||||||
|
|
||||||
The `.replit` `onBoot` command installs dependencies with:
|
The `.replit` `onBoot` command installs dependencies with:
|
||||||
@@ -35,7 +35,7 @@ Use the available `pnpm`. This repo intentionally has no `packageManager` pin.
|
|||||||
## Start
|
## Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm dev
|
node build.mjs && PORT=${PORT:-3000} 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:
|
When Replit AI Integrations are provisioned, the app reads these variables automatically:
|
||||||
@@ -45,10 +45,10 @@ When Replit AI Integrations are provisioned, the app reads these variables autom
|
|||||||
- `AI_INTEGRATIONS_ANTHROPIC_BASE_URL`
|
- `AI_INTEGRATIONS_ANTHROPIC_BASE_URL`
|
||||||
- `AI_INTEGRATIONS_ANTHROPIC_API_KEY`
|
- `AI_INTEGRATIONS_ANTHROPIC_API_KEY`
|
||||||
|
|
||||||
Provider CLI flags are still supported for manual overrides:
|
Provider CLI flags are still supported for manual overrides, but mass deployments should use env vars:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm dev -- \
|
pnpm start -- \
|
||||||
--openai-base-url "<ai-integrations-openai-base-url>" \
|
--openai-base-url "<ai-integrations-openai-base-url>" \
|
||||||
--openai-api-key "<ai-integrations-openai-api-key>" \
|
--openai-api-key "<ai-integrations-openai-api-key>" \
|
||||||
--anthropic-base-url "<ai-integrations-anthropic-base-url>" \
|
--anthropic-base-url "<ai-integrations-anthropic-base-url>" \
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Never use public official provider endpoints.
|
|||||||
## Key Commands
|
## Key Commands
|
||||||
|
|
||||||
- `pnpm install --ignore-workspace` — install dependencies without joining a parent workspace
|
- `pnpm install --ignore-workspace` — install dependencies without joining a parent workspace
|
||||||
- `pnpm dev` — run API server locally on port `3000`
|
- `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 typecheck` — typecheck the server
|
||||||
- `pnpm run build` — typecheck and build `dist/index.mjs`
|
- `pnpm run build` — typecheck and build `dist/index.mjs`
|
||||||
- `pnpm run build:fast` — build `dist/index.mjs` without typechecking
|
- `pnpm run build:fast` — build `dist/index.mjs` without typechecking
|
||||||
@@ -41,7 +41,7 @@ Never use public official provider endpoints.
|
|||||||
|
|
||||||
## Replit Configuration
|
## Replit Configuration
|
||||||
|
|
||||||
- `.replit` `run` uses `pnpm dev`
|
- `.replit` `run` builds with `node build.mjs` and runs `dist/index.mjs`
|
||||||
- `.replit` `onBoot` uses `pnpm install --ignore-workspace`
|
- `.replit` `onBoot` uses `pnpm install --ignore-workspace`
|
||||||
- publishing from a parent workspace should configure root `.replit` deployment and create a shell web artifact
|
- publishing from a parent workspace should configure root `.replit` deployment and create a shell web artifact
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ skills:
|
|||||||
|
|
||||||
4. Create the smallest persistent workflow named "Random Proxy Simple" with this exact run command:
|
4. Create the smallest persistent workflow named "Random Proxy Simple" with this exact run command:
|
||||||
|
|
||||||
cd random-proxy-simple && pnpm dev -- --host 0.0.0.0 --port 3000 --proxy-api-key DEPLOYMENT_GENERATED_PROXY_TOKEN --openai-base-url "$AI_INTEGRATIONS_OPENAI_BASE_URL" --openai-api-key "$AI_INTEGRATIONS_OPENAI_API_KEY" --anthropic-base-url "$AI_INTEGRATIONS_ANTHROPIC_BASE_URL" --anthropic-api-key "$AI_INTEGRATIONS_ANTHROPIC_API_KEY"
|
cd random-proxy-simple && node build.mjs && PORT=3000 PROXY_API_KEY=DEPLOYMENT_GENERATED_PROXY_TOKEN node --enable-source-maps dist/index.mjs
|
||||||
|
|
||||||
5. Start/restart that workflow once.
|
5. Start/restart that workflow once.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user