2023-04-30 16:37:12 +03:00

27 lines
674 B
TypeScript

import express from 'express';
import cors from 'cors';
import * as path from 'path';
import apiRouter from './src/api';
import bodyParser from 'body-parser';
const app = express();
const port = 5000;
app.use(cors())
app.use('/static', express.static(path.join(__dirname, 'static')))
// app.use(express.static(path.join(__dirname, 'static')))
// @ts-ignore
app.use(bodyParser.raw({ type: 'application/soap+xml' }));
app.use(bodyParser.json({ limit: '20mb' }));
// app.use(express.urlencoded({ extended: false }));
// @ts-ignore
app.use(express.json());
app.use('/api', apiRouter)
app.listen(port, () => {
console.log(`Arkids backend app start on port ${port}`);
});