From d66e142ed55e268d4e57edb42db78305206ecea6 Mon Sep 17 00:00:00 2001 From: JianMiau Date: Mon, 11 Sep 2023 16:17:34 +0800 Subject: [PATCH] [mod] --- Dockerfile | 4 ++-- package.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5be241b..4bf6ce4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,5 +33,5 @@ EXPOSE 3003 WORKDIR /app # 指定啟動container後執行命令 -CMD NODE_ENV=prod && node index.js -# CMD [ "npm", "start" ] \ No newline at end of file +# CMD NODE_ENV=prod && node index.js +CMD [ "npm", "run", "prod" ] \ No newline at end of file diff --git a/package.json b/package.json index 7cf71b2..31650a0 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "start": "npm run dev", "dev": "tsrpc-cli dev", - "prod": "node index.js", + "prod": "NODE_ENV=prod && node index.js", + "winprod": "NODE_ENV=prod && node index.js", "debug": "set NODE_ENV=dev && nodemon --exec \"node --require ts-node/register --inspect=127.0.0.1:9229 src/index.ts\"", "build": "tsrpc-cli build", "doc": "tsrpc-cli doc",