bh/src/main.ts
Primakov Alexandr Alexandrovich 4c9afb83b5 init
2024-12-02 22:54:27 +03:00

19 lines
384 B
TypeScript

import express, { json } from 'express';
import { handleError } from './utils/errorHandler'
import 'dotenv/config'
import { router } from './routes'
const app = express();
const port = process.env.PORT || 3000;
app.use(json({ limit: '100kb' }))
app.use(router)
app.use(handleError)
app.listen(port, () => {
console.log(`App is running on port http://localhost:${port}`);
})