first commit

This commit is contained in:
2026-07-16 20:48:43 -03:00
commit 5696cee264
1111 changed files with 322270 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import express from "express";
import helmet from "helmet";
import cors from "cors";
import archivosRoutes from "./routes/archivos";
const app = express();
app.use(helmet());
app.use(cors());
app.use(express.json()); // por si mandás JSON en otras rutas
app.use("/", archivosRoutes);
// manejo básico de errores
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {
console.error(err);
if (res.headersSent) return next(err);
res.status(err.status ?? 500).json({ error: err.message ?? "Error interno" });
});
export default app;