| 1 | import { join } from 'node:path' |
| 2 | import { startApplication } from '@yikart/common' |
| 3 | import cookieParser from 'cookie-parser' |
| 4 | import { AppModule } from './app.module' |
| 5 | import { config } from './config' |
| 6 | |
| 7 | startApplication(AppModule, config, { |
| 8 | setupApp: (app) => { |
| 9 | app.enableCors() |
| 10 | app.use(cookieParser()) |
| 11 | |
| 12 | app.setViewEngine('ejs') |
| 13 | app.setBaseViewsDir(join(__dirname, 'views')) |
| 14 | app.useStaticAssets(join(__dirname, 'public')) |
| 15 | }, |
| 16 | }) |
| 17 |