Add NODE_ENV variables to production packages/scripts

This commit is contained in:
Toast 2025-01-30 10:14:19 +01:00
parent 0bfc6c480f
commit c25a6be9f4
2 changed files with 3 additions and 2 deletions

View file

@ -11,7 +11,7 @@
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"start:prod": "NODE_ENV=production node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",

View file

@ -24,6 +24,7 @@ buildNpmPackage {
mv package.json package-lock.json node_modules dist $out
makeWrapper ${lib.getExe nodejs} $out/bin/shows-api \
--add-flags $out/dist/main --chdir $out
--add-flags $out/dist/main --chdir $out \
--set NODE_ENV production
'';
}