feat: add JWT authentication

This commit is contained in:
Cesar
2026-05-22 17:13:24 -06:00
parent 397c2ef3df
commit 45d6347d4c
15 changed files with 524 additions and 12 deletions

View File

@@ -1,16 +1,15 @@
import express from 'express';
import { env } from "./config/env.js";
import { AppRoutes } from "./presentation/routes.js";
import { Server } from "./presentation/server.js";
const app = express();
const port = process.env.PORT ?? 3000;
app.use(express.json());
app.get('/', (_req, res) => {
res.json({
message: 'API funcionando con Express + TypeScript + TSX',
});
async function main() {
const server = new Server( {
port : env.PORT,
routes : AppRoutes.routes,
});
await server.start();
app.listen(port, () => {
console.log(`Servidor corriendo en http://localhost:${port}`);
});
}
main();