Skip to content

Commit 52fd70a

Browse files
committed
fix: template issue.
1 parent 105a0e1 commit 52fd70a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
ports:
88
- "8000:8000"
99
env_file:
10-
- .env.prod
10+
- .env
1111
networks:
1212
- paperdebugger-mcp-network-prod
1313
restart: unless-stopped

src/app.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import express, { Request, Response } from 'express';
33
import { PaperClassificationAgent } from './agents/paper-classification';
44
import { PaperScoreAgent } from './agents/paper-score';
55
import nunjucks from 'nunjucks';
6+
import fs from 'fs';
67
import { parseLatexDocument } from './common/latex-parser/parser';
78
import { PaperReviewSummaryWeaknessAgent } from './agents/paper-score.2.summary';
89
import { PaperMatchWeaknessSectionsAgent } from './agents/paper-score.3.match-weakness-sections';
@@ -17,7 +18,10 @@ const port = process.env['PORT'] || 8000;
1718

1819
app.use(express.json());
1920

20-
nunjucks.configure('./templates', {
21+
const templatesPath = fs.existsSync("src/templates") ? 'src/templates' : 'dist/templates';
22+
console.log('templatesPath', templatesPath);
23+
24+
nunjucks.configure(templatesPath, {
2125
autoescape: true,
2226
express: app,
2327
});

0 commit comments

Comments
 (0)