From 7ac7a4e0839419b0f6e27cc2ba98b57a1c2130e1 Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Sun, 24 Apr 2022 04:36:42 +0500 Subject: [PATCH 1/2] chore: added start:prod npm script --- api/package.json | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/package.json b/api/package.json index b629c004..d835e4ce 100644 --- a/api/package.json +++ b/api/package.json @@ -8,6 +8,7 @@ "prestart": "npm run initial", "prebuild": "npm run initial", "start": "nodemon ./src/server.ts", + "start:prod": "node ./build/src/server.js", "build": "rimraf build && tsc", "postbuild": "npm run copy:files", "swagger": "tsoa spec", diff --git a/package.json b/package.json index 44c1d7b2..7de82393 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "https://github.com/sasjs/server", "scripts": { "server": "npm run server:prepare && npm run server:start", - "server:prepare": "cd web && npm ci && npm run build && cd ../api && npm ci && cd ..", + "server:prepare": "cd web && npm ci && npm run build && cd ../api && npm ci && npm run build && cd ..", "server:start": "cd api && npm run start", "release": "standard-version", "lint-api:fix": "npx prettier --write \"api/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"", From fb8e18be75b69e55ab990f63796f7b8cb44a9e0f Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Sun, 24 Apr 2022 04:38:28 +0500 Subject: [PATCH 2/2] chore: fix vulnerabilites --- api/package-lock.json | 12 ++++++------ package.json | 2 +- web/package-lock.json | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/api/package-lock.json b/api/package-lock.json index e04bb344..9f8fafeb 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -2448,9 +2448,9 @@ } }, "node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dependencies": { "lodash": "^4.17.14" } @@ -12060,9 +12060,9 @@ } }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "requires": { "lodash": "^4.17.14" } diff --git a/package.json b/package.json index 7de82393..728cab64 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "server": "npm run server:prepare && npm run server:start", "server:prepare": "cd web && npm ci && npm run build && cd ../api && npm ci && npm run build && cd ..", - "server:start": "cd api && npm run start", + "server:start": "cd api && npm run start:prod", "release": "standard-version", "lint-api:fix": "npx prettier --write \"api/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"", "lint-api": "npx prettier --check \"api/src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"", diff --git a/web/package-lock.json b/web/package-lock.json index 3fe8129b..7b9516c8 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -4191,9 +4191,9 @@ "dev": true }, "node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "dependencies": { "lodash": "^4.17.14" @@ -14381,9 +14381,9 @@ "dev": true }, "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14"