feat: Update project dependencies and configuration

This commit updates the project's dependencies, including React, Recharts, and Lucide React, to their latest stable versions. It also introduces a `server.js` file to handle static file serving with Express for better production deployment. Additionally, TypeScript and Vite configurations have been refined for improved build performance and type safety.
This commit is contained in:
MMrp89
2026-02-10 01:12:15 -03:00
parent 1a57ac7754
commit 8c770d43c8
6 changed files with 90 additions and 68 deletions

22
server.js Normal file
View File

@@ -0,0 +1,22 @@
import express from 'express';
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;
// Servir os arquivos estáticos da pasta 'dist' gerada pelo build do Vite
app.use(express.static(path.join(__dirname, 'dist')));
// Redirecionar todas as rotas para o index.html (suporte a SPA)
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
});
app.listen(PORT, () => {
console.log(`Servidor rodando na porta ${PORT}`);
});