From 49b0adabfca3fe98c162c11939c227c870a0b9e0 Mon Sep 17 00:00:00 2001 From: scossa Date: Sun, 18 Aug 2024 16:47:06 +0200 Subject: [PATCH] up --- README.md | 63 +++++++++++++-------------- node_modules/.package-lock.json | 42 ++++++++++++++++++ package-lock.json | 76 +++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index ebe33bd..debb879 100644 --- a/README.md +++ b/README.md @@ -24,18 +24,16 @@ Feature/fix scritte in ordine di priorità [ ] Al momento sul marker temporaneo si vede l'immagine rotta, sul temporaneo non bisogna mostrare nulla
[ ] Creare form per ricerca tra i titoli/descrizioni dei marker esistenti (query esempio: "divano")
[ ] Milgiorare css del form inserimento dati marker
+[ ] Inserire la posizione del marker tramite il gps dello smartphone
[ ] Scatta la foto del marker da uploadare direttamente in app (su alcuni smartphone gia lo fa)
[ ] Creare form e gestire login utenti
[ ] Possibilità di aggiungere piu di una foto per un marker
-### BE -[ ] Inserire la posizione del marker tramite il gps dello smartphone
-

-# INSTALLAZIONE +# ISTRUZIONI INSTALLAZIONE -## Dipendenze +## Installazione dipendenze #### Installa mariadb sudo apt update && sudo apt install mariadb @@ -46,7 +44,7 @@ _trobleshooting: cerca nvm in .bashrc_ ## Installazione ruscomap -#### Clona il git +### Clona il git ``` # crea la cartella mkdir /var/www/html/leaflet/; cd /var/www/html/leaflet/; @@ -55,10 +53,10 @@ mkdir /var/www/html/leaflet/; cd /var/www/html/leaflet/; git clone https://git.lattuga.netscossa/ruscomap.git ``` -#### Personalizza il file di configurazione db +### Personalizza il file di configurazione db nano /var/www/html/leaflet/ruscomap/config/default.json -#### Inizializza db +### Inizializza db ``` # usa la versione node spcificata nel file .nvmrc cd /var/www/html/leaflet/ruscomap/; nvm use @@ -69,25 +67,10 @@ cd /var/www/html/leaflet/ruscomap/; # inzializza db mysql < intdb.sql ``` -#### Apri porta sul firewall -sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT +### Apri porta sul firewall +sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT -
- -## CANCELLA UN RECORD DEL DB -``` -mariadb -u ruscone -p - -show databases; -use ruscomap; -show tables; -select * from markers; -DELETE FROM markers WHERE filename = '0a9f02167f85c845db2d4b81bbeef9d5'; -``` - -
- -## SERVIZIO +### Creare il servzio nano /etc/systemd/system/ruscomap.service ``` @@ -106,17 +89,16 @@ RestartSec=5 WantedBy=multi-user.target ``` -
+### Creare file conf di apache -## APACHE CONF nano /etc/apache2/site-enabled/ruscomap.conf ``` #PORT 80 RUSCOMAP - + DocumentRoot /var/www/html/leaflet/ruscomap/public -ServerName ruscomap.accol.li +ServerName ruscomap.myserver.it ProxyPass / http://localhost:3000/ ProxyPassReverse / http://localhost:3000/ @@ -125,8 +107,6 @@ RewriteEngine on RewriteCond %{HTTP:Upgrade} =websocket RewriteRule /(.*) ws://localhost:3000/$1 [P,L] -#Redirect permanent / https://pad.accol.li/ - ErrorLog ${APACHE_LOG_DIR}/ruscomap.log CustomLog ${APACHE_LOG_DIR}/ruscomap-access.log combined @@ -135,7 +115,24 @@ CustomLog ${APACHE_LOG_DIR}/ruscomap-access.log combined
-## SCRIPT AGGIORNA RUSCOMAP +# ISTRUZIONI ADMIN + +## Cancella un record del db + +``` +mariadb -u ruscone -p + +show databases; +use ruscomap; +show tables; +select * from markers; +DELETE FROM markers WHERE filename = '0a9f02167f85c845db2d4b81bbeef9d5'; +``` + +
+ +## Script per aggiornare ruscomap + nano /var/www/html/leaflet/ruscomap/AggiornaRuscoMap.sh ``` diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 4d564f7..53bad32 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -161,6 +161,17 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "node_modules/cron-parser": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz", + "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==", + "dependencies": { + "luxon": "^3.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -460,6 +471,19 @@ "version": "1.9.4", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, + "node_modules/long-timeout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", + "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==" + }, + "node_modules/luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", + "engines": { + "node": ">=12" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -592,6 +616,19 @@ "node": ">= 0.6" } }, + "node_modules/node-schedule": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz", + "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==", + "dependencies": { + "cron-parser": "^4.2.0", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.3.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -811,6 +848,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sorted-array-functions": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", + "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==" + }, "node_modules/sqlite": { "version": "5.1.1", "integrity": "sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q==" diff --git a/package-lock.json b/package-lock.json index 1c15b88..c55fda5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "leaflet": "^1.9.4", "multer": "^1.4.5-lts.1", "mysql": "^2.18.1", + "node-schedule": "^2.1.1", "sqlite": "^5.1.1" } }, @@ -174,6 +175,17 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "node_modules/cron-parser": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz", + "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==", + "dependencies": { + "luxon": "^3.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -473,6 +485,19 @@ "version": "1.9.4", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, + "node_modules/long-timeout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", + "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==" + }, + "node_modules/luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==", + "engines": { + "node": ">=12" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -605,6 +630,19 @@ "node": ">= 0.6" } }, + "node_modules/node-schedule": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz", + "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==", + "dependencies": { + "cron-parser": "^4.2.0", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.3.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -824,6 +862,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sorted-array-functions": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", + "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==" + }, "node_modules/sqlite": { "version": "5.1.1", "integrity": "sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q==" @@ -1049,6 +1092,14 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, + "cron-parser": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz", + "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==", + "requires": { + "luxon": "^3.2.1" + } + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1266,6 +1317,16 @@ "version": "1.9.4", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" }, + "long-timeout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", + "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==" + }, + "luxon": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz", + "integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1367,6 +1428,16 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, + "node-schedule": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz", + "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==", + "requires": { + "cron-parser": "^4.2.0", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.3.0" + } + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -1531,6 +1602,11 @@ "object-inspect": "^1.13.1" } }, + "sorted-array-functions": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", + "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==" + }, "sqlite": { "version": "5.1.1", "integrity": "sha512-oBkezXa2hnkfuJwUo44Hl9hS3er+YFtueifoajrgidvqsJRQFpc5fKoAkAor1O5ZnLoa28GBScfHXs8j0K358Q=="