feat(backend): add GET /api/materiels catalogue endpoint

This commit is contained in:
SaidSoighiri94
2026-06-19 10:39:27 +02:00
parent bc83308d05
commit bee21b9fd8
7 changed files with 113 additions and 9 deletions
+3
View File
@@ -6,6 +6,7 @@ import { logger } from './utils/logger';
import { requestLogger } from './middlewares/request-logger';
import { notFoundHandler } from './middlewares/not-found';
import { errorHandler } from './middlewares/error-handler';
import { apiRouter } from './routes';
const app = express();
@@ -17,6 +18,8 @@ app.get('/health', (_req, res) => {
res.json({ status: 'ok', app: 'EME API' });
});
app.use('/api', apiRouter);
/* notFoundHandler et errorHandler doivent rester après toutes les routes :
le premier capture les URL non gérées, le second clôt la chaîne Express. */
app.use(notFoundHandler);