diff --git a/backend/tsconfig.json b/backend/tsconfig.json index be55fae..20a24ee 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -80,6 +80,7 @@ "webUISetup.config.js", "vite.config.js", "tailwind.config.js", - "postcss.config.js" + "postcss.config.js", + "config" ] } diff --git a/package.json b/package.json index 26e333f..3ac7bd9 100755 --- a/package.json +++ b/package.json @@ -7,33 +7,7 @@ "node": "20.14.0" }, "scripts": { - "server": "live-server public/", - "build:webpack": "webpack -p --env production", - "build": "tsc && webpack -p --env production && webpack --config webUI.config.js && webpack --config webUISetup.config.js", - "build:docker": "export NODE_OPTIONS=--max_old_space_size=8000 && tsc && webpack -p --env production && webpack --config webUI.config.js && webpack --config webUISetup.config.js", - "build:webUI": "webpack --config webUI.config.js", - "build:dev": "tsc && webpack --env development", - "build:test": "tsc && webpack --env test", - "build:webUISetup": "webpack --config webUISetup.config.js", - "dev-server": "webpack-dev-server", - "test": "NODE_ENV=test env-cmd -f ./config/test.env jest --config=jest.config.json --runInBand", - "start:dev": "NODE_ENV=development node dist/server/serverStart.js", - "start:debug": "NODE_ENV=development node --inspect dist/server/serverStart.js", - "start": "cross-env NODE_ENV=production node dist/server/server-start.js", - "create-indexes-database": "node serverUtils/createIndexes.js", - "increase-node-memory": "export NODE_OPTIONS=--max_old_space_size=8000", - "create-indexes-database:dev": "node serverUtils/createIndexes.js", - "setup:terminal": "node serverUtils/setupServer.js", - "debug": "env-cmd -f ./config/prod.env node --expose-gc --inspect=9222 dist/server/serverStart.js --env production", - "heroku-postbuild": "npm run build", - "setup": "node dist/webUI/startSetupServer.js", - "remove-old-subscription-data": "node serverUtils/removeOldSubscriptionData.js", - "remove-old-personal-data": "node serverUtils/removeOldPersonalData.js", - "remove-tokens": "node serverUtils/removeTokens.js --env production", - "remove-tokens:dev": "NODE_ENV=development node serverUtils/removeTokens.js", - "vite-test": "vite", - "dev-test": "concurrently \"vite\" \"nodemon server.js\"", - "dev-hot": "concurrently \"vite\" \"tsc -w -p ./backend/tsconfig.json\" \"npm run dev:backend\"", + "dev": "concurrently \"vite\" \"tsc -w -p ./backend/tsconfig.json\" \"npm run dev:backend\"", "dev:backend": "NODE_ENV=development nodemon dist/server/server-start.js", "vite-build": "vite build", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'" diff --git a/webUI.config.js b/webUI.config.js deleted file mode 100644 index 0b32d47..0000000 --- a/webUI.config.js +++ /dev/null @@ -1,38 +0,0 @@ -const path = require('path'); -const webpack = require("webpack") -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); - -module.exports = (env) => { - - if (env === "test") { - - console.log("Loading test env variables") - require("dotenv").config({path: ".env.test"}) - - } else if (env === "development") { - - console.log("Loading development env variables") - require("dotenv").config({path: ".env.development"}) - - } else { - - console.log("Loading production env variables") - require("dotenv").config({path: ".env.production"}); - } - - return { - entry: './webUI/src/index.js', - output: { - path: path.resolve(__dirname, 'webUI', "dist"), - filename: 'bundle.js' - }, - plugins: [ - new webpack.DefinePlugin({ - "process.env.PORT": JSON.stringify(process.env.PORT), - "process.env.REMOTE_URL": JSON.stringify(process.env.REMOTE_URL), - "process.env.ENABLE_VIDEO_TRANSCODING": JSON.stringify(process.env.ENABLE_VIDEO_TRANSCODING), - "process.env.DISABLE_STORAGE": JSON.stringify(process.env.DISABLE_STORAGE), - "process.env.SERVER_IP": JSON.stringify(process.env.SERVER_IP) - }), - ], -}}; \ No newline at end of file diff --git a/webUISetup.config.js b/webUISetup.config.js deleted file mode 100644 index 44e88a8..0000000 --- a/webUISetup.config.js +++ /dev/null @@ -1,38 +0,0 @@ -const path = require('path'); -const webpack = require("webpack") -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); - -module.exports = (env) => { - - if (env === "test") { - - console.log("Loading test env variables") - require("dotenv").config({path: ".env.test"}) - - } else if (env === "development") { - - console.log("Loading development env variables") - require("dotenv").config({path: ".env.development"}) - - } else { - - console.log("Loading production env variables") - require("dotenv").config({path: ".env.production"}); - } - - return { - entry: './webUISetup/src/index.js', - output: { - path: path.resolve(__dirname, 'webUISetup', "dist"), - filename: 'bundle.js' - }, - plugins: [ - new webpack.DefinePlugin({ - "process.env.PORT": JSON.stringify(process.env.PORT), - "process.env.REMOTE_URL": JSON.stringify(process.env.REMOTE_URL), - "process.env.ENABLE_VIDEO_TRANSCODING": JSON.stringify(process.env.ENABLE_VIDEO_TRANSCODING), - "process.env.DISABLE_STORAGE": JSON.stringify(process.env.DISABLE_STORAGE), - "process.env.SERVER_IP": JSON.stringify(process.env.SERVER_IP) - }), - ], -}}; \ No newline at end of file