Skip to content

Commit

Permalink
fix(wb): set APP_ENV when starting blitz app
Browse files Browse the repository at this point in the history
  • Loading branch information
exKAZUu committed Sep 30, 2023
1 parent 660c09c commit 63eb939
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/wb/src/scripts/execution/blitzScripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ class BlitzScripts extends BaseExecutionScripts {
}

override start(argv: ScriptArgv): string {
return `YARN concurrently --raw --kill-others-on-fail
const appEnv = process.env.WB_ENV ? `APP_ENV=${process.env.WB_ENV} ` : '';
return `${appEnv}YARN concurrently --raw --kill-others-on-fail
"blitz dev ${argv.normalizedArgsText ?? ''}"
"${this.waitAndOpenApp(argv)}"`;
}

override startProduction(argv: ScriptArgv, port: number): string {
return `NODE_ENV=production YARN concurrently --raw --kill-others-on-fail
const appEnv = process.env.WB_ENV ? `APP_ENV=${process.env.WB_ENV} ` : '';
return `${appEnv}NODE_ENV=production YARN concurrently --raw --kill-others-on-fail
"${prismaScripts.reset()} && ${project.getBuildCommand(
argv
)} && PORT=${port} pm2-runtime start ecosystem.config.cjs ${argv.normalizedArgsText ?? ''}"
Expand Down

0 comments on commit 63eb939

Please sign in to comment.