From ae7381d7e2590523325880ac083b4196d657f943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarik=20Dedi=C4=87?= Date: Fri, 20 Sep 2024 21:01:38 +0200 Subject: [PATCH] Restructure project - adding frontend and backend --- .github/workflows/ci.yml | 93 +- .gitignore | 13 +- backend/.env | 5 + backend/package-lock.json | 808 ++++++++++++++++++ backend/package.json | 17 + backend/server.js | 46 + .editorconfig => frontend/.editorconfig | 0 {.vscode => frontend/.vscode}/extensions.json | 0 {.vscode => frontend/.vscode}/launch.json | 0 {.vscode => frontend/.vscode}/tasks.json | 0 LICENSE => frontend/LICENSE | 0 README.md => frontend/README.md | 0 angular.json => frontend/angular.json | 1 + .../package-lock.json | 0 package.json => frontend/package.json | 0 .../src}/app/app-routing.module.ts | 0 {src => frontend/src}/app/app.component.html | 0 {src => frontend/src}/app/app.component.scss | 0 .../src}/app/app.component.spec.ts | 0 {src => frontend/src}/app/app.component.ts | 0 {src => frontend/src}/app/app.module.ts | 0 .../components/footer/footer.component.html | 0 .../components/footer/footer.component.scss | 0 .../footer/footer.component.spec.ts | 0 .../app/components/footer/footer.component.ts | 0 .../components/navbar/navbar.component.html | 0 .../components/navbar/navbar.component.scss | 0 .../navbar/navbar.component.spec.ts | 0 .../app/components/navbar/navbar.component.ts | 0 .../location-card.component.html | 0 .../location-card.component.scss | 0 .../location-card.component.spec.ts | 0 .../location-card/location-card.component.ts | 0 .../app/pages/contact/contact.component.html | 0 .../app/pages/contact/contact.component.scss | 0 .../pages/contact/contact.component.spec.ts | 0 .../app/pages/contact/contact.component.ts | 0 .../src}/app/pages/home/home.component.html | 0 .../src}/app/pages/home/home.component.scss | 0 .../app/pages/home/home.component.spec.ts | 0 .../src}/app/pages/home/home.component.ts | 0 .../pages/location/location.component.html | 0 .../pages/location/location.component.scss | 0 .../pages/location/location.component.spec.ts | 0 .../app/pages/location/location.component.ts | 0 {src => frontend/src}/assets/.gitkeep | 0 .../src}/assets/images/hero-section.jpg | Bin {src => frontend/src}/assets/images/smet.jpg | Bin {src => frontend/src}/assets/smetovi-bg.jpg | Bin {src => frontend/src}/favicon.ico | Bin {src => frontend/src}/index.html | 0 {src => frontend/src}/main.ts | 0 {src => frontend/src}/styles.scss | 0 .../tailwind.config.js | 0 .../tsconfig.app.json | 0 tsconfig.json => frontend/tsconfig.json | 0 .../tsconfig.spec.json | 0 57 files changed, 955 insertions(+), 28 deletions(-) create mode 100644 backend/.env create mode 100644 backend/package-lock.json create mode 100644 backend/package.json create mode 100644 backend/server.js rename .editorconfig => frontend/.editorconfig (100%) rename {.vscode => frontend/.vscode}/extensions.json (100%) rename {.vscode => frontend/.vscode}/launch.json (100%) rename {.vscode => frontend/.vscode}/tasks.json (100%) rename LICENSE => frontend/LICENSE (100%) rename README.md => frontend/README.md (100%) rename angular.json => frontend/angular.json (99%) rename package-lock.json => frontend/package-lock.json (100%) rename package.json => frontend/package.json (100%) rename {src => frontend/src}/app/app-routing.module.ts (100%) rename {src => frontend/src}/app/app.component.html (100%) rename {src => frontend/src}/app/app.component.scss (100%) rename {src => frontend/src}/app/app.component.spec.ts (100%) rename {src => frontend/src}/app/app.component.ts (100%) rename {src => frontend/src}/app/app.module.ts (100%) rename {src => frontend/src}/app/components/footer/footer.component.html (100%) rename {src => frontend/src}/app/components/footer/footer.component.scss (100%) rename {src => frontend/src}/app/components/footer/footer.component.spec.ts (100%) rename {src => frontend/src}/app/components/footer/footer.component.ts (100%) rename {src => frontend/src}/app/components/navbar/navbar.component.html (100%) rename {src => frontend/src}/app/components/navbar/navbar.component.scss (100%) rename {src => frontend/src}/app/components/navbar/navbar.component.spec.ts (100%) rename {src => frontend/src}/app/components/navbar/navbar.component.ts (100%) rename {src => frontend/src}/app/location-card/location-card.component.html (100%) rename {src => frontend/src}/app/location-card/location-card.component.scss (100%) rename {src => frontend/src}/app/location-card/location-card.component.spec.ts (100%) rename {src => frontend/src}/app/location-card/location-card.component.ts (100%) rename {src => frontend/src}/app/pages/contact/contact.component.html (100%) rename {src => frontend/src}/app/pages/contact/contact.component.scss (100%) rename {src => frontend/src}/app/pages/contact/contact.component.spec.ts (100%) rename {src => frontend/src}/app/pages/contact/contact.component.ts (100%) rename {src => frontend/src}/app/pages/home/home.component.html (100%) rename {src => frontend/src}/app/pages/home/home.component.scss (100%) rename {src => frontend/src}/app/pages/home/home.component.spec.ts (100%) rename {src => frontend/src}/app/pages/home/home.component.ts (100%) rename {src => frontend/src}/app/pages/location/location.component.html (100%) rename {src => frontend/src}/app/pages/location/location.component.scss (100%) rename {src => frontend/src}/app/pages/location/location.component.spec.ts (100%) rename {src => frontend/src}/app/pages/location/location.component.ts (100%) rename {src => frontend/src}/assets/.gitkeep (100%) rename {src => frontend/src}/assets/images/hero-section.jpg (100%) rename {src => frontend/src}/assets/images/smet.jpg (100%) rename {src => frontend/src}/assets/smetovi-bg.jpg (100%) rename {src => frontend/src}/favicon.ico (100%) rename {src => frontend/src}/index.html (100%) rename {src => frontend/src}/main.ts (100%) rename {src => frontend/src}/styles.scss (100%) rename tailwind.config.js => frontend/tailwind.config.js (100%) rename tsconfig.app.json => frontend/tsconfig.app.json (100%) rename tsconfig.json => frontend/tsconfig.json (100%) rename tsconfig.spec.json => frontend/tsconfig.spec.json (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bbdfac..61e7cb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,63 +3,110 @@ name: CI/CD Pipeline on: push: branches: - - main # Trigger deployment only on push to main + - main # Trigger deployment only on push to the main branch pull_request: branches: - - main # Run build checks on PRs but don't deploy + - main # Run checks on PRs, but don't deploy jobs: - build: + # --- Build Frontend --- + build-frontend: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - - - name: Set up Node.js + + - name: Set up Node.js for frontend uses: actions/setup-node@v3 with: - node-version: '20' # specify the Node.js version + node-version: '20' # Specify the Node.js version - - name: Install dependencies + - name: Install frontend dependencies + working-directory: ./frontend # Navigate to the frontend folder run: npm install - # Optional: Uncomment if you want to run tests - # - name: Run tests - # run: npm test -- --watch=false --browsers=ChromeHeadless - - - name: Build project + - name: Build frontend + working-directory: ./frontend run: npm run build - - name: Upload artifact + - name: Upload frontend artifact uses: actions/upload-artifact@v4 with: name: angular-build - path: "./dist/smetovi/" + path: ./frontend/dist/ # Path to Angular build files - deploy: - # Deploy only when a push is made directly to the main branch - if: github.ref == 'refs/heads/main' # Ensure deployment happens only on push to main - needs: build + # --- Build Backend --- + build-backend: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - - name: Download artifact + - name: Set up Node.js for backend + uses: actions/setup-node@v3 + with: + node-version: '20' # Specify the Node.js version + + - name: Install backend dependencies + working-directory: ./backend # Navigate to the backend folder + run: npm install + + - name: Upload backend artifact + uses: actions/upload-artifact@v4 + with: + name: backend-artifact + path: ./backend # Upload the backend folder for deployment + + # --- Deploy Frontend --- + deploy-frontend: + runs-on: ubuntu-latest + needs: build-frontend # Ensure the frontend build completes before deployment + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download frontend artifact uses: actions/download-artifact@v4 with: name: angular-build - path: "./dist/smetovi/" + path: ./frontend/dist/ # Download the Angular build + + - name: Deploy frontend to cPanel via FTP + uses: SamKirkland/FTP-Deploy-Action@4.3.0 + with: + server: ${{ secrets.FTP_SERVER }} + username: ${{ secrets.FTP_USERNAME }} + password: ${{ secrets.FTP_PASSWORD }} + local-dir: ./frontend/dist/ # Adjust this to match your project build output + server-dir: /public_html/frontend/ # Path where frontend files are deployed on server + port: ${{ secrets.FTP_PORT }} + log-level: verbose + + # --- Deploy Backend --- + deploy-backend: + runs-on: ubuntu-latest + needs: build-backend # Ensure the backend build completes before deployment + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Download backend artifact + uses: actions/download-artifact@v4 + with: + name: backend-artifact + path: ./backend # Download the backend code - - name: Deploy to cPanel hosting via FTP + - name: Deploy backend to cPanel via FTP uses: SamKirkland/FTP-Deploy-Action@4.3.0 with: server: ${{ secrets.FTP_SERVER }} username: ${{ secrets.FTP_USERNAME }} password: ${{ secrets.FTP_PASSWORD }} - local-dir: ./dist/smetovi/ # Adjust this to match your project build output - server-dir: /public_html/ # Adjust this to your target directory on the server + local-dir: ./backend # Deploy the entire backend folder + server-dir: /public_html/backend/ # Path where backend files are deployed on server port: ${{ secrets.FTP_PORT }} log-level: verbose diff --git a/.gitignore b/.gitignore index 0711527..52364f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,13 @@ # See http://help.github.com/ignore-files/ for more about ignoring files. # Compiled output -/dist -/tmp -/out-tsc -/bazel-out +/frontend/dist +/frontend/tmp +/frontend/node_modules +/frontend/out-tsc +/frontend/bazel-out +/backend/node_modules +/backend/tmp # Node /node_modules @@ -29,7 +32,7 @@ yarn-error.log .history/* # Miscellaneous -/.angular/cache +/frontend/.angular/cache .sass-cache/ /connect.lock /coverage diff --git a/backend/.env b/backend/.env new file mode 100644 index 0000000..08c0ff8 --- /dev/null +++ b/backend/.env @@ -0,0 +1,5 @@ +DB_HOST=localhost +DB_USER=root +DB_PASSWORD= +DB_NAME=smetovi +DB_PORT=4000 \ No newline at end of file diff --git a/backend/package-lock.json b/backend/package-lock.json new file mode 100644 index 0000000..80a83c2 --- /dev/null +++ b/backend/package-lock.json @@ -0,0 +1,808 @@ +{ + "name": "backend", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "backend", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "dotenv": "^16.4.5", + "express": "^4.21.0", + "mysql": "^2.18.1" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "engines": { + "node": "*" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", + "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.6.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.10", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/backend/package.json b/backend/package.json new file mode 100644 index 0000000..7d9ea53 --- /dev/null +++ b/backend/package.json @@ -0,0 +1,17 @@ +{ + "name": "backend", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "dotenv": "^16.4.5", + "express": "^4.21.0", + "mysql": "^2.18.1" + } +} diff --git a/backend/server.js b/backend/server.js new file mode 100644 index 0000000..3576302 --- /dev/null +++ b/backend/server.js @@ -0,0 +1,46 @@ +require('dotenv').config(); + +const express = require('express'); +const mysql = require('mysql'); +const path = require('path'); + +const app = express(); +const PORT = process.env.DB_PORT || 4000; + +// MySQL database connection +const db = mysql.createConnection({ + host: process.env.DB_HOST, + user: process.env.DB_USER, + password: process.env.DB_PASSWORD, + database: process.env.DB_NAME +}); + +db.connect((err) => { + if (err) { + console.error('Error connecting to MySQL:', err); + return; + } + console.log('Connected to MySQL database'); +}); + +// Serve the Angular frontend +app.use(express.static(path.join(__dirname, '../frontend/dist/smetovi'))); + +// API endpoint example +app.get('/api/data', (req, res) => { + db.query('SELECT * FROM locations', (err, results) => { + if (err) { + return res.status(500).send(err); + } + res.json(results); + }); +}); + +// Handle Angular routes +app.get('*', (req, res) => { + res.sendFile(path.join(__dirname, '../frontend/dist/smetovi/index.html')); +}); + +app.listen(PORT, () => { + console.log(`Server is running on http://localhost:${PORT}`); +}); diff --git a/.editorconfig b/frontend/.editorconfig similarity index 100% rename from .editorconfig rename to frontend/.editorconfig diff --git a/.vscode/extensions.json b/frontend/.vscode/extensions.json similarity index 100% rename from .vscode/extensions.json rename to frontend/.vscode/extensions.json diff --git a/.vscode/launch.json b/frontend/.vscode/launch.json similarity index 100% rename from .vscode/launch.json rename to frontend/.vscode/launch.json diff --git a/.vscode/tasks.json b/frontend/.vscode/tasks.json similarity index 100% rename from .vscode/tasks.json rename to frontend/.vscode/tasks.json diff --git a/LICENSE b/frontend/LICENSE similarity index 100% rename from LICENSE rename to frontend/LICENSE diff --git a/README.md b/frontend/README.md similarity index 100% rename from README.md rename to frontend/README.md diff --git a/angular.json b/frontend/angular.json similarity index 99% rename from angular.json rename to frontend/angular.json index 594571e..c647885 100644 --- a/angular.json +++ b/frontend/angular.json @@ -23,6 +23,7 @@ "polyfills": [ "zone.js" ], + "baseHref": "/", "tsConfig": "tsconfig.app.json", "inlineStyleLanguage": "scss", "assets": [ diff --git a/package-lock.json b/frontend/package-lock.json similarity index 100% rename from package-lock.json rename to frontend/package-lock.json diff --git a/package.json b/frontend/package.json similarity index 100% rename from package.json rename to frontend/package.json diff --git a/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts similarity index 100% rename from src/app/app-routing.module.ts rename to frontend/src/app/app-routing.module.ts diff --git a/src/app/app.component.html b/frontend/src/app/app.component.html similarity index 100% rename from src/app/app.component.html rename to frontend/src/app/app.component.html diff --git a/src/app/app.component.scss b/frontend/src/app/app.component.scss similarity index 100% rename from src/app/app.component.scss rename to frontend/src/app/app.component.scss diff --git a/src/app/app.component.spec.ts b/frontend/src/app/app.component.spec.ts similarity index 100% rename from src/app/app.component.spec.ts rename to frontend/src/app/app.component.spec.ts diff --git a/src/app/app.component.ts b/frontend/src/app/app.component.ts similarity index 100% rename from src/app/app.component.ts rename to frontend/src/app/app.component.ts diff --git a/src/app/app.module.ts b/frontend/src/app/app.module.ts similarity index 100% rename from src/app/app.module.ts rename to frontend/src/app/app.module.ts diff --git a/src/app/components/footer/footer.component.html b/frontend/src/app/components/footer/footer.component.html similarity index 100% rename from src/app/components/footer/footer.component.html rename to frontend/src/app/components/footer/footer.component.html diff --git a/src/app/components/footer/footer.component.scss b/frontend/src/app/components/footer/footer.component.scss similarity index 100% rename from src/app/components/footer/footer.component.scss rename to frontend/src/app/components/footer/footer.component.scss diff --git a/src/app/components/footer/footer.component.spec.ts b/frontend/src/app/components/footer/footer.component.spec.ts similarity index 100% rename from src/app/components/footer/footer.component.spec.ts rename to frontend/src/app/components/footer/footer.component.spec.ts diff --git a/src/app/components/footer/footer.component.ts b/frontend/src/app/components/footer/footer.component.ts similarity index 100% rename from src/app/components/footer/footer.component.ts rename to frontend/src/app/components/footer/footer.component.ts diff --git a/src/app/components/navbar/navbar.component.html b/frontend/src/app/components/navbar/navbar.component.html similarity index 100% rename from src/app/components/navbar/navbar.component.html rename to frontend/src/app/components/navbar/navbar.component.html diff --git a/src/app/components/navbar/navbar.component.scss b/frontend/src/app/components/navbar/navbar.component.scss similarity index 100% rename from src/app/components/navbar/navbar.component.scss rename to frontend/src/app/components/navbar/navbar.component.scss diff --git a/src/app/components/navbar/navbar.component.spec.ts b/frontend/src/app/components/navbar/navbar.component.spec.ts similarity index 100% rename from src/app/components/navbar/navbar.component.spec.ts rename to frontend/src/app/components/navbar/navbar.component.spec.ts diff --git a/src/app/components/navbar/navbar.component.ts b/frontend/src/app/components/navbar/navbar.component.ts similarity index 100% rename from src/app/components/navbar/navbar.component.ts rename to frontend/src/app/components/navbar/navbar.component.ts diff --git a/src/app/location-card/location-card.component.html b/frontend/src/app/location-card/location-card.component.html similarity index 100% rename from src/app/location-card/location-card.component.html rename to frontend/src/app/location-card/location-card.component.html diff --git a/src/app/location-card/location-card.component.scss b/frontend/src/app/location-card/location-card.component.scss similarity index 100% rename from src/app/location-card/location-card.component.scss rename to frontend/src/app/location-card/location-card.component.scss diff --git a/src/app/location-card/location-card.component.spec.ts b/frontend/src/app/location-card/location-card.component.spec.ts similarity index 100% rename from src/app/location-card/location-card.component.spec.ts rename to frontend/src/app/location-card/location-card.component.spec.ts diff --git a/src/app/location-card/location-card.component.ts b/frontend/src/app/location-card/location-card.component.ts similarity index 100% rename from src/app/location-card/location-card.component.ts rename to frontend/src/app/location-card/location-card.component.ts diff --git a/src/app/pages/contact/contact.component.html b/frontend/src/app/pages/contact/contact.component.html similarity index 100% rename from src/app/pages/contact/contact.component.html rename to frontend/src/app/pages/contact/contact.component.html diff --git a/src/app/pages/contact/contact.component.scss b/frontend/src/app/pages/contact/contact.component.scss similarity index 100% rename from src/app/pages/contact/contact.component.scss rename to frontend/src/app/pages/contact/contact.component.scss diff --git a/src/app/pages/contact/contact.component.spec.ts b/frontend/src/app/pages/contact/contact.component.spec.ts similarity index 100% rename from src/app/pages/contact/contact.component.spec.ts rename to frontend/src/app/pages/contact/contact.component.spec.ts diff --git a/src/app/pages/contact/contact.component.ts b/frontend/src/app/pages/contact/contact.component.ts similarity index 100% rename from src/app/pages/contact/contact.component.ts rename to frontend/src/app/pages/contact/contact.component.ts diff --git a/src/app/pages/home/home.component.html b/frontend/src/app/pages/home/home.component.html similarity index 100% rename from src/app/pages/home/home.component.html rename to frontend/src/app/pages/home/home.component.html diff --git a/src/app/pages/home/home.component.scss b/frontend/src/app/pages/home/home.component.scss similarity index 100% rename from src/app/pages/home/home.component.scss rename to frontend/src/app/pages/home/home.component.scss diff --git a/src/app/pages/home/home.component.spec.ts b/frontend/src/app/pages/home/home.component.spec.ts similarity index 100% rename from src/app/pages/home/home.component.spec.ts rename to frontend/src/app/pages/home/home.component.spec.ts diff --git a/src/app/pages/home/home.component.ts b/frontend/src/app/pages/home/home.component.ts similarity index 100% rename from src/app/pages/home/home.component.ts rename to frontend/src/app/pages/home/home.component.ts diff --git a/src/app/pages/location/location.component.html b/frontend/src/app/pages/location/location.component.html similarity index 100% rename from src/app/pages/location/location.component.html rename to frontend/src/app/pages/location/location.component.html diff --git a/src/app/pages/location/location.component.scss b/frontend/src/app/pages/location/location.component.scss similarity index 100% rename from src/app/pages/location/location.component.scss rename to frontend/src/app/pages/location/location.component.scss diff --git a/src/app/pages/location/location.component.spec.ts b/frontend/src/app/pages/location/location.component.spec.ts similarity index 100% rename from src/app/pages/location/location.component.spec.ts rename to frontend/src/app/pages/location/location.component.spec.ts diff --git a/src/app/pages/location/location.component.ts b/frontend/src/app/pages/location/location.component.ts similarity index 100% rename from src/app/pages/location/location.component.ts rename to frontend/src/app/pages/location/location.component.ts diff --git a/src/assets/.gitkeep b/frontend/src/assets/.gitkeep similarity index 100% rename from src/assets/.gitkeep rename to frontend/src/assets/.gitkeep diff --git a/src/assets/images/hero-section.jpg b/frontend/src/assets/images/hero-section.jpg similarity index 100% rename from src/assets/images/hero-section.jpg rename to frontend/src/assets/images/hero-section.jpg diff --git a/src/assets/images/smet.jpg b/frontend/src/assets/images/smet.jpg similarity index 100% rename from src/assets/images/smet.jpg rename to frontend/src/assets/images/smet.jpg diff --git a/src/assets/smetovi-bg.jpg b/frontend/src/assets/smetovi-bg.jpg similarity index 100% rename from src/assets/smetovi-bg.jpg rename to frontend/src/assets/smetovi-bg.jpg diff --git a/src/favicon.ico b/frontend/src/favicon.ico similarity index 100% rename from src/favicon.ico rename to frontend/src/favicon.ico diff --git a/src/index.html b/frontend/src/index.html similarity index 100% rename from src/index.html rename to frontend/src/index.html diff --git a/src/main.ts b/frontend/src/main.ts similarity index 100% rename from src/main.ts rename to frontend/src/main.ts diff --git a/src/styles.scss b/frontend/src/styles.scss similarity index 100% rename from src/styles.scss rename to frontend/src/styles.scss diff --git a/tailwind.config.js b/frontend/tailwind.config.js similarity index 100% rename from tailwind.config.js rename to frontend/tailwind.config.js diff --git a/tsconfig.app.json b/frontend/tsconfig.app.json similarity index 100% rename from tsconfig.app.json rename to frontend/tsconfig.app.json diff --git a/tsconfig.json b/frontend/tsconfig.json similarity index 100% rename from tsconfig.json rename to frontend/tsconfig.json diff --git a/tsconfig.spec.json b/frontend/tsconfig.spec.json similarity index 100% rename from tsconfig.spec.json rename to frontend/tsconfig.spec.json