Tried adding API-backend

This commit is contained in:
2025-05-07 13:21:18 +02:00
parent dcc06d94f2
commit e6a4c6d2f7
7 changed files with 2307 additions and 30 deletions

20
api-backend/src/index.ts Normal file
View File

@@ -0,0 +1,20 @@
import * as express from 'express';
import pathRoutes from './routes/parkRoutes';
import coasterRoutes from './routes/coasterRoutes';
const app = express();
const port = 3000;
// Middleware für JSON-Anfragen
app.use(express.json());
// Routen hinzufügen
app.use('/api/parks', pathRoutes);
app.use('/api/coasters', coasterRoutes);
// Start des Servers
app.listen(port, () => {
console.log(`Server läuft auf http://localhost:${port}`);
});
export default app;