Update der Ansicht

This commit is contained in:
2025-08-17 07:19:32 +00:00
parent 028fee7794
commit c3515ac714
16 changed files with 3858 additions and 144 deletions
+23
View File
@@ -0,0 +1,23 @@
import express from 'express';
import axios from 'axios';
import dotenv from 'dotenv';
dotenv.config();
const app = express();
const PORT = process.env.PORT || 4000; // <- Port geändert
const PORTAINER_URL = process.env.PORTAINER_URL;
const PORTAINER_TOKEN = process.env.PORTAINER_TOKEN;
app.get('/stacks', async (req, res) => {
try { const response = await axios.get(`${PORTAINER_URL}/stacks`, { headers: {
'Authorization': `Bearer ${PORTAINER_TOKEN}` }
});
res.json(response.data);
} catch (err) {
console.error(err); res.status(500).json({ error: 'Fehler beim Abrufen der Stacks' });
}
});
app.listen(PORT, '0.0.0.0', () => { console.log(`Backend läuft auf
http://0.0.0.0:${PORT}`);
});