Add prod run script for Replit
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
run = "node build.mjs && PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} node --enable-source-maps dist/index.mjs"
|
run = "PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} pnpm prod"
|
||||||
onBoot = "pnpm install --ignore-workspace"
|
onBoot = "pnpm install --ignore-workspace"
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"dev": "tsx src/index.ts",
|
"dev": "tsx src/index.ts",
|
||||||
"build": "tsc --noEmit && node build.mjs",
|
"build": "tsc --noEmit && node build.mjs",
|
||||||
"build:fast": "node build.mjs",
|
"build:fast": "node build.mjs",
|
||||||
|
"prod": "node build.mjs && node --enable-source-maps dist/index.mjs",
|
||||||
"start": "node --enable-source-maps dist/index.mjs",
|
"start": "node --enable-source-maps dist/index.mjs",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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
|
||||||
node build.mjs && PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} node --enable-source-maps dist/index.mjs
|
PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} pnpm prod
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
||||||
node build.mjs && PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} node --enable-source-maps dist/index.mjs
|
PORT=${PORT:-3000} PROXY_API_KEY=${PROXY_API_KEY:-dev-proxy-key} pnpm prod
|
||||||
```
|
```
|
||||||
|
|
||||||
When Replit AI Integrations are provisioned, the app reads these variables automatically:
|
When Replit AI Integrations are provisioned, the app reads these variables automatically:
|
||||||
|
|||||||
@@ -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
|
||||||
- `node build.mjs && node --enable-source-maps dist/index.mjs` — build and run API server locally on port `3000`
|
- `pnpm prod` — 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` builds with `node build.mjs` and runs `dist/index.mjs`
|
- `.replit` `run` uses `pnpm prod`
|
||||||
- `.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 && node build.mjs && PORT=3000 PROXY_API_KEY=DEPLOYMENT_GENERATED_PROXY_TOKEN node --enable-source-maps dist/index.mjs
|
cd random-proxy-simple && PORT=3000 PROXY_API_KEY=DEPLOYMENT_GENERATED_PROXY_TOKEN pnpm prod
|
||||||
|
|
||||||
5. Start/restart that workflow once.
|
5. Start/restart that workflow once.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user