20 lines
467 B
TypeScript
20 lines
467 B
TypeScript
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; |