18 lines
455 B
TypeScript
18 lines
455 B
TypeScript
import express from 'express';
|
|
import { errorHandler } from './middleware/error.middleware';
|
|
import authRoutes from './routes/auth.routes';
|
|
import userRoutes from './routes/user.routes';
|
|
import eventTypeRoutes from './routes/eventType.routes';
|
|
|
|
const app = express();
|
|
|
|
app.use(express.json());
|
|
|
|
app.use('/api/auth', authRoutes);
|
|
app.use('/api/users', userRoutes);
|
|
app.use('/api/event-types', eventTypeRoutes);
|
|
|
|
app.use(errorHandler);
|
|
|
|
export default app;
|