4th ed.
This commit is contained in:
parent
045977f9fb
commit
5b4a2b90e5
3 changed files with 26 additions and 7 deletions
|
|
@ -288,7 +288,7 @@ async function startLauncher() {
|
|||
const saved = loadApps();
|
||||
if (saved) {
|
||||
appsData = saved;
|
||||
console.log("Apps caricate da localStorage:", appsData);
|
||||
//console.log("Apps caricate da localStorage:", appsData);
|
||||
}
|
||||
|
||||
// 2️⃣ Carica ordine
|
||||
|
|
@ -867,7 +867,6 @@ function initDragHandlers() {
|
|||
if (draggingIcon) {
|
||||
endDrag();
|
||||
}
|
||||
StartY = pos.clientY;
|
||||
draggingIcon = null;
|
||||
draggingId = null;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
|
||||
<script src="app.js"></script>
|
||||
|
||||
<!-- --> <script src="https://cdn.jsdelivr.net/npm/eruda"></script>
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/eruda"></script>
|
||||
<script>
|
||||
eruda.init();
|
||||
</script> <!-- -->
|
||||
</script> -->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -26,8 +26,28 @@ const MONGO_URI = process.env.MONGO_URI || "mongodb://mongo:27017/mydb";
|
|||
|
||||
mongoose
|
||||
.connect(MONGO_URI)
|
||||
.then(() => console.log("MongoDB connesso"))
|
||||
.catch(err => console.error(err));
|
||||
.then(() => {
|
||||
console.log("MongoDB connesso");
|
||||
})
|
||||
.catch(err => {
|
||||
console.error("❌ Errore di connessione a MongoDB:", err.message);
|
||||
process.exit(1); // termina il processo
|
||||
});
|
||||
|
||||
|
||||
|
||||
const PORT = process.env.PORT || 3000;
|
||||
app.listen(PORT, () => console.log(`API su http://localhost:${PORT}`));
|
||||
|
||||
const server = app.listen(PORT, () => {
|
||||
console.log(`API su http://localhost:${PORT}`);
|
||||
});
|
||||
|
||||
server.on('error', (err) => {
|
||||
if (err.code === 'EADDRINUSE') {
|
||||
console.error(`❌ Porta ${PORT} già in uso. Arresto del processo.`);
|
||||
process.exit(1);
|
||||
} else {
|
||||
console.error('Errore del server:', err);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue