/** * BreakPilot H5P Service - Simplified Version * Minimal H5P integration without h5p-express complexity */ import express from 'express'; import cors from 'cors'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const app = express(); const PORT = process.env.PORT || 8080; // Middleware app.use(cors()); app.use(express.json({ limit: '500mb' })); app.use(express.urlencoded({ extended: true, limit: '500mb' })); // Serve static H5P files app.use('/h5p/core', express.static(path.join(__dirname, 'h5p-core'))); app.use('/h5p/libraries', express.static(path.join(__dirname, 'h5p-libraries'))); app.use('/h5p/content', express.static(path.join(__dirname, 'h5p-content'))); // Serve editors app.use('/h5p/editors', express.static(path.join(__dirname, 'editors'))); // Serve players app.use('/h5p/players', express.static(path.join(__dirname, 'players'))); // Content type specific editors app.get('/h5p/editor/quiz', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'quiz-editor.html')); }); app.get('/h5p/player/quiz', (req, res) => { res.sendFile(path.join(__dirname, 'players', 'quiz-player.html')); }); app.get('/h5p/editor/flashcards', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'flashcards-editor.html')); }); app.get('/h5p/editor/fill-blanks', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'fill-blanks-editor.html')); }); app.get('/h5p/player/fill-blanks', (req, res) => { res.sendFile(path.join(__dirname, 'players', 'fill-blanks-player.html')); }); app.get('/h5p/editor/memory', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'memory-editor.html')); }); app.get('/h5p/player/memory', (req, res) => { res.sendFile(path.join(__dirname, 'players', 'memory-player.html')); }); app.get('/h5p/editor/drag-drop', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'drag-drop-editor.html')); }); app.get('/h5p/player/drag-drop', (req, res) => { res.sendFile(path.join(__dirname, 'players', 'drag-drop-player.html')); }); app.get('/h5p/editor/timeline', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'timeline-editor.html')); }); app.get('/h5p/player/timeline', (req, res) => { res.sendFile(path.join(__dirname, 'players', 'timeline-player.html')); }); app.get('/h5p/editor/interactive-video', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'interactive-video-editor.html')); }); app.get('/h5p/player/interactive-video', (req, res) => { res.sendFile(path.join(__dirname, 'players', 'interactive-video-player.html')); }); app.get('/h5p/editor/course-presentation', (req, res) => { res.sendFile(path.join(__dirname, 'editors', 'course-presentation-editor.html')); }); app.get('/h5p/player/course-presentation', (req, res) => { res.sendFile(path.join(__dirname, 'players', 'course-presentation-player.html')); }); // Main H5P Editor Selection Page app.get('/h5p/editor/new', (req, res) => { res.send(`
Erstelle interaktive Lerninhalte wie Quizze, Videos mit Fragen, PrΓ€sentationen und vieles mehr. H5P (HTML5 Package) ermΓΆglicht es, ansprechende und interaktive Bildungsinhalte zu erstellen, die auf allen GerΓ€ten funktionieren.
Multiple-Choice-Tests mit sofortigem Feedback und Punktebewertung
Videos mit eingebetteten Fragen, Links und anderen interaktiven Elementen
PrΓ€sentationen mit interaktiven Folien, Fragen und Multimedia-Inhalten
Lernkarten zum Γben und Wiederholen von Vokabeln und Konzepten
Interaktive Zeitstrahle mit Bildern, Videos und Beschreibungen
Elemente ziehen und an der richtigen Stelle ablegen - ideal fΓΌr Zuordnungsaufgaben
LΓΌckentexte mit automatischer Korrektur und Hinweisen
Klassisches Memory-Spiel mit Bildern oder Text-Paaren
Alle 8 Content-Typen sind jetzt verfΓΌgbar: Quiz, Interactive Video, Course Presentation, Flashcards, Timeline, Drag and Drop, Fill in the Blanks und Memory Game! Klicke auf eine Kachel, um den Editor zu ΓΆffnen.
Vereinfachte H5P-Integration fΓΌr BreakPilot Studio
H5P Editor ΓΆffnen Health Check