const http = require('http'); const fs = require('fs'); const path = require('path'); const server = http.createServer((req, res) => { // Servir arquivos estáticos da pasta public if (req.url.startsWith('/') && req.url.includes('.')) { const filePath = path.join(__dirname, 'public', req.url); const ext = path.extname(filePath).toLowerCase(); const contentTypes = { '.html': 'text/html', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.png': 'image/png', '.gif': 'image/gif', '.svg': 'image/svg+xml', '.webp': 'image/webp', '.ico': 'image/x-icon' }; if (fs.existsSync(filePath)) { const contentType = contentTypes[ext] || 'application/octet-stream'; res.writeHead(200, { 'Content-Type': contentType, 'Cache-Control': 'public, max-age=3600', 'Access-Control-Allow-Origin': '*' }); fs.createReadStream(filePath).pipe(res); return; } } res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(` PDIMaker - Plataforma de Desenvolvimento Individual

🚀 PDIMaker

Plataforma de Desenvolvimento Individual

✨ Sistema em Construção

Estamos preparando uma experiência incrível para seu desenvolvimento profissional!

📝

Diário de Atividades

🎯

Metas & PDI

🧪

Testes Vocacionais

👥

Reuniões 1:1

Versão: 1.0.0-alpha | ${new Date().getFullYear()}

`); }); const PORT = 3000; server.listen(PORT, '0.0.0.0', () => { console.log(`✅ PDIMaker Frontend running on port ${PORT}`); });